Code Monkey home page Code Monkey logo

Comments (18)

jansenbe avatar jansenbe commented on June 12, 2024

Hi Russel,

Below is the applied logic...essentially if we can't identify the page as webpartpage, wikipage, clientsidepage or publishingpage we assume it's a basic aspx page.

Can you check the list item fields for those pages? Can you edit these in SharePoint?

        public static string PageType(this ListItem item)
        {
            if (FieldExistsAndUsed(item, Constants.HtmlFileTypeField) && !String.IsNullOrEmpty(item[Constants.HtmlFileTypeField].ToString()))
            {
                if (item[Constants.HtmlFileTypeField].ToString().Equals("SharePoint.WebPartPage.Document", StringComparison.InvariantCultureIgnoreCase))
                {
                    return "WebPartPage";
                }
            }

            if (FieldExistsAndUsed(item, Constants.WikiField) && !String.IsNullOrEmpty(item[Constants.WikiField].ToString()))
            {
                return "WikiPage";
            }

            if (FieldExistsAndUsed(item, Constants.ClientSideApplicationIdField) && item[Constants.ClientSideApplicationIdField].ToString().Equals(Constants.FeatureId_Web_ModernPage.ToString(), StringComparison.InvariantCultureIgnoreCase))
            {
                return "ClientSidePage";
            }

            if (FieldExists(item, Constants.PublishingRollupImageField) && FieldExists(item, Constants.AudienceField))
            {
                return "PublishingPage";
            }

            if (FieldExistsAndUsed(item, Constants.WikiField))
            {
                return "WikiPage";
            }

            return "AspxPage";
        }

from modernization.

russgove avatar russgove commented on June 12, 2024

Hi Bert,
I have 2 sample pages. Home.aspx cannot be transformed , Home2.aspx transforms just fine.
I can edit both pages in the browser, however when I edit Home.aspx none of the webparts show, it's just showing me an empty wiki page to edit.
they look the same when viewed in the libtrary:

image

Home.aspx is item #1 is the Site pages list. Home2.aspx is item 17

when I hit Web/Lists(guid'b4c8013a-d2d6-43b7-8658-7d04e71d993c')/Items(1) i get:
image

when I hit Web/Lists(guid'b4c8013a-d2d6-43b7-8658-7d04e71d993c')/Items(17) i get:
image

So Home.aspx has no wiki content.

from modernization.

russgove avatar russgove commented on June 12, 2024

These pages are being migrated from on prem using sharegate. I redid the migration of just that page and the edit experience in the browser worked properly. (i.e. when i edit the page i can see all the webparts).

When I run ConvertTo-PnPClientSidePage now i am getting:
image

from modernization.

jansenbe avatar jansenbe commented on June 12, 2024

@russgove : a page without wiki content should still be flagged as wiki page and result in an empty page. I'll open a bug to cross check that in the transformation engine (#22).

For the error after re-import via ShareGate: can provide me the field properties (like you did before with Web/Lists(guid'b4c8013a-d2d6-43b7-8658-7d04e71d993c')/Items(17)) and if possible the contents (html) from the wikifield?

from modernization.

russgove avatar russgove commented on June 12, 2024

from modernization.

jansenbe avatar jansenbe commented on June 12, 2024

File is not shown when attached as to mail. Can you paste the contents in here or alternatively send to me via email?

from modernization.

russgove avatar russgove commented on June 12, 2024

from modernization.

jansenbe avatar jansenbe commented on June 12, 2024

CanvasContent1 and LayoutWebpartsContent are filled, this already is a modern page. Was this created by ShareGate? Somehow the ClientSideApplicationId field is not present, which is what I use to detect a modern page...looks really weird

from modernization.

russgove avatar russgove commented on June 12, 2024

from modernization.

russgove avatar russgove commented on June 12, 2024

from modernization.

russgove avatar russgove commented on June 12, 2024

OK , I tested with and without that setting.
Sharegate seems to ALWAYs add CanvasContent1 and LayoutWebpartsContent

image

from modernization.

russgove avatar russgove commented on June 12, 2024

btw. Its sharegate v 9.0.2

from modernization.

jansenbe avatar jansenbe commented on June 12, 2024

Interesting...I checked the canvascontent1 field and clearly contains the html structure for a modern client side page...but somehow the ClientSideApplicationId field is not configured with the modern page feature id (=B6917CB1-93A0-4B97-A84D-7CF49975D4EC). Somehow someone experimented with this page resulting in an invalid setup...you could try with setting the ClientSideApplicationId field

from modernization.

jansenbe avatar jansenbe commented on June 12, 2024

Hi @russgove,

Any update on this one? It's interesting to understand how that page got created

from modernization.

russgove avatar russgove commented on June 12, 2024

Hi Bert,
The page was migrated to spo from a 2010 on prem page using sharegate.
I'm going to close this issue because we are not sure whether the site will be moved to SPO or another platform..

from modernization.

berryst2 avatar berryst2 commented on June 12, 2024

Hi,
I'm getting this error when we tried doing the modern page conversion.
we copied the pages/files from on-premises SP 2013 to SPO using ShareGate.
we'd like to investigate this further to understand what could be done so that we can modernise the classic publishing pages to modern pages....

from modernization.

greddin avatar greddin commented on June 12, 2024

I'm also getting this as well on site pages that were migrated with ShareGate. Has there ever been a resolution or workaround for this? Thanks.

from modernization.

RalphBoccalini avatar RalphBoccalini commented on June 12, 2024

I am facing the same issue on multiple sites that we are trying to modernize, is there any solution about this topic?

from modernization.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.