HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[SOLVED!] ocPortal site merger functionality

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#103609 (In Topic #20264)
Avatar

Honoured member

Yesterday I used the Site Merger function under the Import tool to port one of my v8 sites to v9.  For the most part, everything went well (I stepped thru each of the import categories one at a time as suggested - although it's a slow process, there are dependencies that require certain components to be imported first).

Strangely, my old site has about 30 comcode pages that I built, yet only one (seemingly random choice!) page got imported???

I went back to the tool to see if there was an option to import just the pages, but I didn't see anything.  Can anyone suggest a relatively simple, clean way to migrate comcode pages from one instance of OCP to another?

Thx very much.


Last edit: by superiorpyro
Back to the top
 
Posted
Rating:
#103614
Avatar

It looks like Comcode pages aren't supported at all in the tool, so I'm not sure why one apparently came through.

But you can just manually copy the .txt files from one site to another.

We will document so other's don't find this pitfall.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#103615
Avatar

Honoured member

Thanks as always for the helpful information.  If you could, would you please provide the correct path to the text files?  I think I have an idea, as I was poking around wondering if that would work, but I'd like to confirm with you before I mess anything up.

For what it's worth, the import overall went pretty well, but there were a number of casualties as well.  As an example, even though the checklist says I can import galleries, the reality is that the images didn't make it to the new site... which is too bad because there were hundreds, so it's going to be a significant undertaking to move them.  The same thing for some of the other categories, however I believe that there was a warning noting that the tool isn't intended to import between versions, so I'm going to assume that the content that didn't make it thru was a reslut of that.

The reason I moved is to prepare for the future release of version 10.. hopefully upgrading from 9 to 10 will be a little smoother for exisitng sites :)
Back to the top
 
Posted
Item has a rating of 5 (Liked by superiorpyro)  
Rating:
#103616
Avatar

Got to head out now, but on code analysis I can see a bug in image import

Code (diff)

+++ b/sources/hooks/modules/admin_import/ocp_merge.php
@@ -1092,7 +1092,7 @@ class Hook_ocp_merge
                $on_same_msn=($this->on_same_msn($file_base));
                foreach ($rows as $row)
                {
-                       if (import_check_if_imported('attachment',strval($row['id']))) continue;
+                       if (import_check_if_imported('image',strval($row['id']))) continue;
 

Will make a hotfix later plus some way to reset the importer to be able to reimport images.

Comcode pages are <zone>/pages/comcode_custom/<language>/<page>.txt


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#103617
Avatar

To allow the galleries step to re-run, enter this command into OcCLE:

Code

:$GLOBALS['SITE_DB']->query_delete('import_parts_done',array('imp_id'=>'images_and_galleries'));

You should be able to resume your previous import session so it can then continue, just re-doing this bit.

It should be smart enough to not re-import galleries or videos (i.e. just the missing images), as it still has the previous importing of them tracked (so long as you really do restore the previous import session).

Hotfix coming in a moment.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Important!
Posted
Item has a rating of 5 (Liked by Steven JarvisLiked by superiorpyro)  
Rating:
#103618
Avatar

Automated fix message

superiorpyro said

Thanks as always for the helpful information.  If you could, would you please provide the correct path to the text files?  I think I have an idea, as I was poking around wondering if that would work, but I'd like to confirm with you before I mess anything up.

For what it's worth, the import overall went pretty well, but there were a number of casualties as well.  As an example, even though the checklist says I can import galleries, the reality is that the images didn't make it to the new site... which is too bad because there were hundreds, so it's going to be a significant undertaking to move them.  The same thing for some of the other categories, however I believe that there was a warning noting that the tool isn't intended to import between versions, so I'm going to assume that the content that didn't make it thru was a reslut of that.

The reason I moved is to prepare for the future release of version 10.. hopefully upgrading from 9 to 10 will be a little smoother for exisitng sites :)
This issue has been filed on the tracker as issue #1649, with a fix.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Important!
 
Posted
Rating:
#103619
Avatar

The same thing for some of the other categories

I couldn't find any other instances of this specific problem in the ocPortal site merger importer. If you let me know exactly what kind of content you think is missing, I can look a bit closer.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#103621
Avatar

Honoured member

I think it helped Chris, but now getting this error message for every image:

The website software cannot access the file from the given URL (http://mpag.org/site/uploads/galleries/Owosso%20-%202007-1.jpg). If this file was just uploaded, then there may be an issue with a .htaccess file or the temporary directory file permissions.

In terms of other issues I ran into during the import, as I worked through each of the categories on the import page one at a time, I believe the very last one was "permissions" (which I obviously wanted to import) - unfortunately, that never completed successfully.  I'm not sure if it's because of a code issue, or just because of the change from v8 to v9?
Back to the top
 
Posted
Rating:
#103622
Avatar

I think it helped Chris, but now getting this error message for every image:

For the same URL, or the image URL of the particular image you are viewing?

That URL worked for me, so I think either you fixed it, or you have some kind of server configuration problem whereby the server can't look up it's own URLs (e.g. a DNS problem).

I believe the very last one was "permissions" (which I obviously wanted to import) - unfortunately, that never completed successfully

I would need to know a specific error message. I can't see anything in the code that would break, but an error message may provide a clue.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Item has a rating of 5 (Liked by Steven Jarvis)  
Rating:
#103626
Avatar

Honoured member

Yes Sir, I took a cue from your previous advice and used the copy functionality to move the images from the old site directory, into the new one.  Evidently during the import, the gallery framework and gallery structures were moved, but the files themselves were not.  Copying them over fixed the problem and now they work as expected.

In terms of an error, I would be hard pressed to duplicate it because I'd have to go thru each of the import categories again (which would likely overwrite some of the clean up work I've already done) in order to get to the "permissions" category, which happens to be the last one.  It's not a giant problem, just a little extra effort to reset some of the permissions.

It's got a little more work on my end, but overall I have to give the site merger functionality an A++!  Great tool, thanks very much Chris and ocPortal dev team. 

:thumbs::thumbs::thumbs:
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: