Diff with Metadata fields

OK All,


I've just upgraded to brand-spanking 3.24.2 and would like to preview the differences between the current page & the edited page, including the differences of Metadata.



Any Ideas ???



Cheers Julian

I also just upgraded to 3.24.2 and the show differences preview doesn't seem to be working at all. Just shows the edited version. Is this what is happening to you too, or do you see other changes but not metadata?

That feature only works for frontend content, so it will only show metadata differences if you are displaying the metadata values on the page.

[quote]
I also just upgraded to 3.24.2 and the show differences preview doesn't seem to be working at all. Just shows the edited version. Is this what is happening to you too, or do you see other changes but not metadata?

[/quote]



I don't have any problems previewing the changes, just any changed metadata, probably 'cause it's in a paint layout.

[quote]
That feature only works for frontend content, so it will only show metadata differences if you are displaying the metadata values on the page.

[/quote]



Gidday Greg, can I get it to show the changes if they are in a Paint Layout? - tried, no joy :frowning:

[quote]
Gidday Greg, can I get it to show the changes if they are in a Paint Layout? - tried, no joy :frowning:

[/quote]



Is the paint layout in Safe Edit?



The differences only work between a system and edited version, this includes paint layouts as well as the asset you are previewing.


Paint layout in safe edit, would that be as disastrous as a design in safe edit?

I am not a developer but I imagine that the paint layout is the issue. Paint layout's override the assets usual output with whatever shenanigans you choose to impose, so the first question would be where is it looking for the source to mess with and was safe edit taken into account when paint layouts were developed?

Is the metadata that shows when you have the layout applied the old values or the new? If it is the old I would put my money on the fact that the paint layout is the inhibitor and show diff or layouts cant handle the truth. If it is the new, same as above and a bug maybe?

A test without paint layouts applied and with metadata exposed would show whether or not show differences take into account the metadata of a page. If no show diff then same as above and a bug maybe?

Diff safe edit support for pages with paint layouts was specifically added in a recent release. You can safe edit paint layouts just fine if you are just editing the content.


Designs are only complicated by the linking system, which is not supported in safe edit but used by design areas and customisations.


That is great, so it would either be a version issue or bug for Julz?

[quote]You can safe edit paint layouts just fine if you are just editing the content.[/quote]

Great, again, but would be very interesting to know how to preview the safe edited version of the layout. Off topic and probably worthy of a tut in tips?

[quote]Designs are only complicated by the linking system, which is not supported in safe edit but used by design areas and customisations.[/quote]

Would never expect it to be any different, oh the pain and the scars from rescuing clients who just assumed it would be fine as it was possible. One for the feature bizzare - Remove the ability to safe edit designs. Oh, and off topic again, cascade safe edit from the site asset so that we can re-arrange the site without it actually re-arranging the site until we are done.

Another question;

Does the show diff work at the html level within the wysiwyg? e.g. H1 to H# changes etc.?

The diff safe edit support for paint layouts was a specifically added feature. Diffs never bothered trying to support paint layouts previously but we changed that code to run through the paint layout system before diffing.


And yes, it diffs at the HTML level and the changed sections are wrapped in ins and del tags.


So, if it isn't working in 3.24.2 the latest stable release it would be a bug?

Still running through in my mind the possible ways to preview a safe edited layout too, a challenge worth betting Nic on :)

added- don't want to confuse the fact that safe editing a page with a layout is a different thing than safe editing a layout. Doing both at the same time would be a treat though:)

Was just thinking about this more. Ben, can you let me know if the paint layout itself really needs to be in safe edit at all? I think I remember it simply not applying existing paint layouts before that change you did, so the paint layout itself could be live for both page versions.

[quote]
Was just thinking about this more. Ben, can you let me know if the paint layout itself really needs to be in safe edit at all? I think I remember it simply not applying existing paint layouts before that change you did, so the paint layout itself could be live for both page versions.

[/quote]



Paint layouts can already be safe edited. If you made it so they were pushed into safe edit by a page that was in safe edit and was using it then I would say that no it doesn't need to be, just make it live for both versions. Happy to help :slight_smile:



As for previewing a safe edited paint layout, I have cracked the code. Set paint layout as a custom asset type and apply it to itself and preview the layout as you are working. Has limitations though, like not being much use if you are adding shenanigans to anything but a paint layout ;), and show diff doesn't work.

[quote]
Still running through in my mind the possible ways to preview a safe edited layout too, a challenge worth betting Nic on :slight_smile:

[/quote]



Ha! You ain't winning that money back!

[quote] Was just thinking about this more. Ben, can you let me know if the paint layout itself really needs to be in safe edit at all? I think I remember it simply not applying existing paint layouts before that change you did, so the paint layout itself could be live for both page versions. [/quote] Only if you want to see the changes on the paint layout itself, otherwise it will just show the diff on the page. I have checked on a version of 3.24.2 here and I am able to preview the paint layout (if in safe edit), metadata and page changes. (And yes, it was first released in 3.24.2). So to me it doesn't look like a bug, maybe it could be something relating to the setup of the systems?


PS. Oh BTW, tested a page(safe edit), paint layout(live with metadata keywords) and changed the metadata on the page, the diff shows through the metadata changes on the paint layout.

[quote]
Only if you want to see the changes on the paint layout itself, otherwise it will just show the diff on the page. I have checked on a version of 3.24.2 here and I am able to preview the paint layout (if in safe edit), metadata and page changes. (And yes, it was first released in 3.24.2). So to me it doesn't look like a bug, maybe it could be something relating to the setup of the systems?



PS. Oh BTW, tested a page(safe edit), paint layout(live with metadata keywords) and changed the metadata on the page, the diff shows through the metadata changes on the paint layout.

[/quote]



Hmmmmm, I don't get any "painting" of the page at all. so if I use http://www.cpit.ac.nz/sandbox/certificate_in_synchronised_swimming/_nc?SQ_ACTION=diff to preview the asset I get the page without the metadata painted onto it (but can see the differences), and if I use http://www.cpit.ac.nz/sandbox/certificate_in_synchronised_swimming/_nc I get the asset (with the new changes) and the metadata values painted onto it (and of course no diff).

[quote]
Hmmmmm, I don’t get any “painting” of the page at all. so if I use http://www.cpit.ac.nz/sandbox/certificate_in_synchronised_swimming/_nc?SQ_ACTION=diff to preview the asset I get the page without the metadata painted onto it (but can see the differences), and if I use http://www.cpit.ac.nz/sandbox/certificate_in_synchronised_swimming/_nc?SQ_ACTION=diff I get the asset (with the new changes) and the metadata values painted onto it (and of course no diff).

[/quote]



A long shot, but are you using an old design (a design that created before the upgrade) that hasn’t been re-parsed yet? If yes, try re-parsing the design (on the Details screen).

[quote]
A long shot, but are you using an old design (a design that created before the upgrade) that hasn't been re-parsed yet? If yes, try re-parsing the design (on the Details screen).

[/quote]



You bloody Star! :smiley: