-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues when copying pages with page chooser #3
Comments
This is going to be a little tricky. We'd have to do a 2 pass approach where we first persist all of the assets and then go back and fill in asset chooser relationships. |
Another possibility we thought about is to create the pages recursively as needed. For example, and to give you context, let's say we are building a hierarchy where pages include pages that include pages. So the script would look at all the pages in it, see if they exist and if not create them, and repeat the process for each of the pages all the way down until the pages all are created. I think this recursive approach would be the best to account for any level of page inclusion. |
Yep, that could work too. We've explored both ways when implementing other types of features such as Site Migration and Site Import. A couple of considerations for doing it this way:
If you do the 2-pass approach, you just need to keep track of any assignments and leave them blank during the 1st pass. Then go back and re-link the assets during the 2nd pass. |
Good points! I played around with the recursive approach a bit and ran into the circularities issue where a child page included the parent page, so neither would ever create. I agree that the 2-pass approach is the way to go. I'll give this a shot, unless you're working on it already. |
I have not had a chance to look at that yet.
|
The 2-pass approach seems to work. I want to clean up the code a bit next week before submitting it. |
I forked the project and submitted a pull request. This is my first time using GitHub so I hope I did everything correctly. I added comments for what I contributed. |
I saw your PR come through. I have a task on my list to review it shortly. On Thu, Sep 26, 2013 at 3:35 PM, jolamar [email protected] wrote:
|
Okay no rush. Just making sure I did it correctly. Thanks! |
Yep, you're all set. Did the script changes work well for you all? On Thu, Sep 26, 2013 at 4:09 PM, jolamar [email protected] wrote:
|
Yeah! Without your 2-pass suggestion, we would have been stuck in a loop. I've also been adding some additional features that allow us to copy users/groups and transports/destinations/etc when copying a folder, but those don't appear in the PR. Since we are using custom authentication we have no don't need to copy a user's password over. However, we can't put in the password for FTP transports via Webservices as far as I can tell. This is pretty manageable for us if that's all managers need to modify after the migration. We are still going to be running some tests with migrating and we'll let you know how they turn out. |
When copying pages that have a page chooser in the data definition, it won't copy if the page that's being included hasn't already been created. Here's the message I get:
Josh
The text was updated successfully, but these errors were encountered: