v7 to v13 Migrated Site - 404 Page Not Found error for all nodes unless they are republished
p
I have a site that has been migrated from v7 to v13 with relatively few issues however in the v13 site despite there being a url in Umbraco and the status being published all urls return a 404 error unless they are manually published again. Any ideas why this might be and if there is a way to correct it without having to republish every page in the site? I have tried reloading all caches, restarting the site and even publishig the root node with all descendants and none seem to correct the issue.
This still seems to be an issue, weirdly even programatically republishing all pages doesn't fix it either. The only way I can make the pages available is to publish them individually through the UI.
s
I've had issues with this kind of upgrade where a field that is expecting a blob of json (perhaps a block list or a content picker) where some legacy / invalid json exists in the field the publish will often fail in an annoying way. I can't quite recall the exact setup to make this happen (or I would have reported it as a bug) but when it does happen the only way to clear it is to set this field to empty programmatically. If you're seeing new nodes behave fine and some legacy nodes have weird publish errors check this. HTH
r
That sounds vaguely similar I admittedly this was for a site that was pulling in data for a third party, and the Jason was not consistent so if information was non existent it wasn’t null, it just didn’t exist.. So we had nulls and then failures in publish… my solution was at the data end, ie lots of check if filed exists and so on.. It may only be a single field but tracing it might be a bit of nightmare I think logging and looking at pages where data types have changed or id to guides have changed
p
@SiempreSteve @Ravi The pages publish fine though when done manually through the UI so if it was missing or invalid data I would have expected it to fail there also? I will need to dig deeper into the property data and try and compare some before and after examples to see if anything changes during publication that might give some pointers.
s
They appeared to publish but didn't really in the front end. It was defintitely pickers and they appeared empty in the back office but had some legacy json in there... I guess it trips up the angular loading and potentially blanks it out on publish. Via content service publishes you didn't get that blank out... Sorry, it was an annoying problem I eventually worked around so can't quite put my finger on what it was
p
Thanks for the pointer - it at least gives me another avenue to investigate.
The data for the node seems fine from a validation point of view however I neglected to pay proper attention to the error on the front end which states > "No template exists to render the document at URL '/xxxxx/xxxx/xxxxx/'." The template is there, I can access it via the settings section, open it via the node or content type. Saving the content type has no effect. The
templateNodeId
in the
cmsDocumentType
is correct for the content type.
Finally, I've isolated the issue to the
umbracoDocumentVersion
table - for some reason there is no entry in the table until I publish the node through the UI 🤔
Copy code
SELECT dv.id, v.nodeId
FROM umbracoDocumentVersion dv
JOIN umbracoContentVersion v ON dv.id = v.id
WHERE dv.templateId IS NULL;
This query reveals nearly 10,000 rows with no
templateId
What I really need to do now is work out what the UI is doing during a publish that calling
SaveAndPublish
on the
ContentService
is not so I can sort this out programatically.
s
Might be an idea to run an SQL profile trace but manually updating Umbraco content via the DB is usually not recommended
At this point I would look at how many pages you actually have. It might be worth doing an export / import into a new v13 db.
r
I had that but for a user that had been deleted and we had orphaned pages I’m with Steve unless it a very limited number ie <100 I would not be touching the db if I could
p
There is 10,000 rows with no template so will need to do some further digging on it today.
d
Very long shot but does the doc type have a template set as default?
3 Views