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.


[Resolved] Importing SMF forum

Login / Search

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

Community saint

OK, guys, I got hung up trying to import my SMF 1.1.x forum to ocf. The "forum" step throws "Forum not found (x)" (where 'x'= forum (/category) number I assume) message and stops. I've tried repeating this several times but no joy. This is on my local test server so I tried different things, including reinstalling ocPortal (for a clean import), butchering up the database in various ways (trying to force the import), multiple imports over top old ones without cleaning up anything (it's just a test bed after all! :thumbs:  ). The only thing that would change is 'x'. It would either be 1 or it be 25. Looking at the db, it would show either no forums imported (1) or it would show just about all my forums imported (25).

Any suggestions, tips or tricks on getting the importer to complete? I've read the two tutorials (Importing data into ocPortal and Nuances of forum integration) without any luck. Is there some other tutorials on this that I missed?

Would like to import my active forum sometime in the next few weeks.

Thanks!

Steve
Back to the top
 
Posted
Rating:
#71575
Avatar

I think this will fix your problem.

Attachment
sources/ocf_forums_action.php
» Download: ocf_forums_action.php (6 Kb, 199 downloads so far)


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:
#71586
Avatar

Community saint

Chris Graham said

I think this will fix your problem.

Thanks, Chris.

This got me past the forum problem, but now its stuck on importing the posts. I have 2656 posts in my forum but the importer chokes at around 500. I ran two import sessions. The first session quit at 636 post. Using a clean (ocp) db, I ran the second session with it quiting at 498 posts.

I noticed a lot of "db query failed" in the browser text when the importer quit.
Database query failed: INSERT INTO ocp_import_id_remap (id_session, id_type, id_old, id_new) VALUES (355279, 'post', '759', NULL) [Column 'id_new' cannot be null]
Database query failed: INSERT INTO ocp_translate (source_user, broken, importance_level, text_original, text_parsed, language) VALUES (2, 0, 4, 'WOW! Thank you very much Timothy. This is a great help i have to say. No i can also add extra functions as well besides the two presented here.\n\nMany many thanks for your help on this.  ;D', '', 'EN')
[Incorrect string value: '\xA0 ;D' for column 'text_original' at row 1]Database query failed: INSERT INTO ocp_f_posts (p_title, p_post, p_ip_address, p_time, p_poster, p_poster_name_if_guest, p_validated, p_topic_id, p_is_emphasised, p_cache_forum_id, p_last_edit_time, p_last_edit_by, p_intended_solely_for, p_skip_sig) VALUES ('Re: Help with creating menu', NULL, '24.158.181.244', 1193771992, 268, 'DaveM', 1, 247, 0, 21, 0, NULL, NULL, 0) [Column 'p_post' cannot be null]


Any suggestions?

Steve
Back to the top
 
Posted
Rating:
#71587
Avatar

If you don't mind sending a copy of an SQL dump to chris@ocportal.com I will take a look tomorrow.


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:
#71593
Avatar

Community saint

SQL dump sent. email subject: sql dump (re: Importing SMF forum)

Thanks again, Chris, for your help.

Steve
Back to the top
 
Posted
Rating:
#71611
Avatar

3 separate issues here.

  1. When I tested, there was an error importing polls, due to a poll with no associated topic in the database. Fix attached.
  2. ocPortal's importer may time out (lots of things can make it happen), but it is re-entrant. It should automatically refresh itself (you'll see the browser may still be doing something) or if not you can manually refresh the browser until it finishes. You can also make the number (default 15 seconds) much bigger if you are lucky enough to be on a server/browser/connection combination that won't time you out.
  3. Your ocPortal database has unicode tables (MySQL must be set to default to this on your server). Either change them to latin1 or try adding this in the info.php file: $SITE_INFO['database_charset']='latin1'; (to force the MySQL server to understand it has to convert the iso-8859-1 characters it is being sent to unicode when saving into the database).

Attachment
sources/hooks/modules/admin_import/smf.php
» Download: smf.php (40 Kb, 198 downloads so far)


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:
#71633
Avatar

Community saint

Your attachment caused the SMF importer to not show up in the list.

Steve
Back to the top
 
Posted
Rating:
#71638
Avatar

Try deleting it then reuploading it.


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:
#71656
Avatar

Community saint

Still no joy. If I put the original in, it shows up in the list. I get the same results on two servers.

Steve
Back to the top
 
Posted
Rating:
#71661
Avatar

My bad, I uploaded the wrong file, sorry about that.

Attachment
» Download: smf.php (42 Kb, 198 downloads so far)


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:
#71666
Avatar

Community saint

Chris Graham said

My bad, I uploaded the wrong file, sorry about that.

No biggie, mistakes happen. You're only human after all, right?

It worked as expected on my test server.  :thumbs: Thanks for all your hard work, Graham!


[anti-whisper]note to ocPortal staff: the automaton has a bug that causes wrong files to be uploaded and needs a firmware upgrade![/anti-whisper]  :lol:

Sorry Graham, just joking…  :P

Steve
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: