none
SharePoint Server 2019 - If Modern UI has no concept of master page, then why classic master page is affecting a modern page? RRS feed

  • Question

  • Hello,

    We are working on deciding modernization approach of classic sites, and we thought of keeping pages into classic mode, while list and libraries into Modern mode.

    Considering this approach, we have applied customized master page ( with custom java scripts in it) to classic page, however when we go to list and libraries in modern view, it's throwing following error, and we could realize that it's coming from the master page applied on the classic page.

    My confusion is - If Modern UI has no concept of master page, then why classic master page is affecting a modern page of list and library?

    Best Regards,


    Dipti Chhatrapati


    Wednesday, August 14, 2019 12:28 PM

Answers

  • Hi Dipti,

    What is the detailed logic of the code in classic master page ? If it is affecting the Modern Page in your side, please try to add script via Script/Content Editor Web Part for classic page.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, August 20, 2019 12:50 AM

All replies

  • Hi Dipti,

    Yes, I can reproduce this issue when applying a error script inside classic master page, then modern experience library will also have affects, throw error message:

    Yes, from official document, Modern UI not supported to have custom master page yet:

    Customizing "modern" team sites

    I did a test if I write a simple correct alert value with JavaScript in classic master page, then this won't execute in Modern UI libarary. I think SharePoint will validate classic Master Page error even it is using Modern UI, if there is no errors, then render Modern Experience.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, August 15, 2019 7:33 AM
  • Hi Jerry,

    Thank you for verifying it, however I assume, Modern UI, do not support changing master page for modern pages - does it mean we can not change classic master page too for the classic pages in the same modern site?

    If yes, how does that relate to one of the modernization approach "maximizing the list and libraries uses" as mentioned here?

    Best Regards,


    Dipti Chhatrapati


    Friday, August 16, 2019 10:30 AM
  • Hi Dipti,

    As I tested, in the classic Master Page, if the script/CSS code is correct, then both Classic/Modern Experenice page/list view page will work without problem.

    So for a Classic Site, it's still available to customize master page, but need to firstly debug inside classic page to make sure the script code is working, then it will also work for Modern Experience UI.

    For "maximizing the list and libraries uses", for the list templates which currently not supported in Modern Experience, I would suggest to still wait for Microsoft update and release in the future.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, August 19, 2019 5:11 AM
  • Hi Jerry, Thank you for responding back!

    But I think, I am still not very clear on the points mentioned, Can you please clarify again:

    1. As I tested, in the classic Master Page, if the script/CSS code is correct, then both Classic/Modern Experience page/list view page will work without problem. --> Very first you have tested that when you are changing the classic master page with JS code of "Alert", It's affecting the modern UI of "AllItems" view, and later you have mentioned if script works in classic master page, then it also works in all modern UI of list view.Can you please clarify ?
    2. So for a Classic Site, it's still available to customize master page, but need to firstly debug inside classic page to make sure the script code is working, then it will also work for Modern Experience UI. --> well, even if classic master page works for classic pages with correct js code, it's still not working for Modern UI of "All Items" view. - same aspect as mentioned in point 1.
    3. For "maximizing the list and libraries uses", for the list templates which currently not supported in Modern Experience, I would suggest to still wait for Microsoft update and release in the future. - Does it mean, currently we can not change classic master page for using modern list and libraries views? Basically I require a confirmation on the same.

    Thanks and Regards,


    Dipti Chhatrapati

    Monday, August 19, 2019 7:10 AM
  • Hi Dipti,

    1. I tested to add some simple test JavaScript code inside classic Master Page, Seattle.html <head> tag, if it is correct, then Classic Page will have a alert when page load, Modern Page won't execute the JavaScript code, but it can display correct without the error capture in original question:

    2. What I mean is if add correct JavaScript code in Classic Master Page, it will apply the action in classic page only, Modern Page still won't execute the JavaScript code, but it can be displayed without problem as above point specified.

    3. Currently, Microsoft suggested not convert the unsupported list template for Modern Site, you can see this description below:

    Hope this can clear your concern.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.


    Monday, August 19, 2019 7:29 AM
  • in my case, if I add "correct" javascript in classic master page, then modern UI of list is affecting as I mentioned in my original question question, but in your last response you said, if we add "correct" javascript, then default modern UI should be working as expected - however in my case it's still throws an error for default Modern UI ( it will b fine if javascript of classic master page doesnt work in Modern UI, but it should not affect the default modern UI with error ) 

    Is there any connection of "Default Modern UI of default list view" with Classic master page?

    Best Regards,


    Dipti Chhatrapati


    Monday, August 19, 2019 11:27 AM
  • Hi Dipti,

    What is the detailed logic of the code in classic master page ? If it is affecting the Modern Page in your side, please try to add script via Script/Content Editor Web Part for classic page.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, August 20, 2019 12:50 AM
  • Is it ok to add "Script Editor Webpart" in master page? or it should be added in every classic page?

    Best Regards,


    Dipti Chhatrapati

    Thursday, August 22, 2019 10:11 AM
  • Hi Dipti,

    Script Editor Web Part needs to add in evey classic page, you can use some PowerShell script to add the script web part automatically:

    How To Add Script Editor WebParts To SharePoint 2013 Publishing Pages Using PowerShell.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, August 23, 2019 12:55 AM