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. ocPortal 9 is 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.


Problem with importing links

Login / Search

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

Community saint

Hi,

The first step I did after installing ocp is importing links from my old website. It worked fine (the problem was that I did not changed encoding of ocp, thus I lost all lithuanian characters)

What I did now, I deleted whole catalogue of links and tried to import it again. Now I get:
Fatal error: Cannot redeclare ocf_wrapper() in /home/clients/testas.klajoklis.lt/public_html/sources_custom
/ocf_general_old.php on line 2

What should I do?\

I just tried and found out that I cannot import anything at all to my website. Always the same error message.

I have checked that file and found this code:

Code

<?php
function ocf_wrapper($title,$content,$show_personal_bar=true,$show_stats=true,$forum_id=NULL)
{
   global $ZONE;
   $old_zone_wide=$ZONE['zone_wide'];
   $ZONE['zone_wide']=1;
   $ret=non_overrided__ocf_wrapper($title,$content,$show_personal_bar=true,$show_stats=false,$forum_id=NULL);
   
   $ZONE['zone_wide']=$old_zone_wide;
   return $ret;
}
?>

I have no idea when this file was created. there is no such file in the ocf package.


OK. I deleted that file and now I get normal ocf error pages.

Maybe I have to have Catalogue prepared for importing links?


After I tried to re-import quotes of the day (the same reason: lost charset) and I got this answer:
"A text file for language is missing: quotes"


Last edit: by Mindaugas
Back to the top
 
Posted
Rating:
#29407
Avatar

ocf_general_old.php: I think you've taken a backup file and placed it in the sources_custom directory. ocPortal doesn't like that - each php file in there is treated as something ocPortal can load.


For the quotes error – is this a phpNuke import? The easiest fix for this is to create a blank text_custom/LT/quotes.txt file, but we'll also include a fix in the next patch release.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: