I'm creating a template from a portal where we backed up pages (tabs) as Store - Copy (for Store, for instance), My Account as My Account - Copy, etc.

These tabs are now deleted. Also removed from the Recycle Bin.

But ... when a template is created, the content tag in the template shows Store - Copy when the page on the portal being copied is Store.

The Content Items Table and related tables need to be re-synchronized basically. The content on Portal 0 should be the only content to copy.

All child portals except one have been removed. We're using Catalook, which has a resources table (sort of like a cache) and this has been cleared out. (Truncated) But even now when making a template, the Store - Copy (and other pages with - Copy) are referenced.

Exactly how is this table re-synchronized such that the content being used is for portal 0? Am I asking the question clearly?

This is a bit of very advanced SQL -- for me anyhow. Never have used this myself but I understand basically what it's doing. I was going to try something like this to fix the issue using SQL I did understand (and would have ended up being MUCH more involved...) but this should nail it.

It was obvious metadata, etc. was not right. I did save one child
portal that has some work I need in it -- PortalID 1103. It sounds like
I only want Portal 0 itself to exist before I run your query, just to
be certain metadata updates ONLY as intended. Would this be correct?

I just needed to find a good link that explains MERGE to enhance my grasp of it and then look at your query again. For the benefit of others, here's the query with portal 1103 used on the first INNER JOIN. *NOT* to be used on the production case, of course but to illustrate what's going on. The page (tab) names are right and when looking at portal 0 those tab names are also right.

My query looked at the incorrect content names based on a JOIN with TabId values. The other way below shows the correct Tab Names that will be used to update / Insert into the the Metadata table by getting the right names from the Tabs table.

This answers my own question. Just had to dig a bit into how the correct query works and hopefully this benefits others.

Content Layout

Subscribe to DNN Digest

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.