-
Notifications
You must be signed in to change notification settings - Fork 12
Rewrite links #2
Comments
This is partially completed (there is a build task) but I think it's buggy. |
It sounds like @phptek is going to to finish this off. Most of the code is in
So, before importing a page, run something like this: (it would need to be abstracted out for different content types, the query would be created using the ORM, etc, but you get the idea)
The other issue I ran into is that there were a lot of URLs that couldn't be rewritten, and I'm not sure if this is because of trivial differences (like case, or escaping of characters) that should be detected. I would have "link couldn't be rewritten" warnings aggregated into a single list so we can dig into what's going on with them. |
OK, so to summarise from what @sminnee has said above, as a base to work from here's what I'll do:
|
State of Play
Further investigation and work should occur next week. |
A massive number of changes, refactoring, bugfixing and tests have been added to my fork (https://github.com/phptek/silverstripe-staticsiteconnector). The link-rewrite is much more effective as each import can now be identified by an ID, the ID can therefore be passed to the task so it "knows" which duplicate to modify. |
Update: this can now be optionally run automatically via the UI after an import. I have also added a DatObject driven CMS report, derived from data gathered during this task, which shows in detail, which links failed to be re-written, breaks them down by type and provides a per-imported page count of each. |
Internal links within the site should be rewritten to point to the imported SilverStripe pages.
The text was updated successfully, but these errors were encountered: