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] v6.0.2 Critical Error relating to ocpo_news

Login / Search

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

Community saint

I just got this critical error trying to open my main page:
Attachment
» Download: Critical error.doc (37 Kb, 115 downloads so far)


Last edit: by temp1024

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68163
Avatar

hi,

could you run a repair on your tables, this sounds like something corrupted


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

Community saint

Interesting, just tried it again this morning and its working.

Didn't touch a thing!

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68168
Avatar

Well-settled

Hi Chris,

Long time since my last visit :) I am sorry for disappearing but there are business issues had me to pay attention to them. Now I was trying to get back to OcPortal sites I managed lately but getting a severe issue with OcPortal :(
I've created a test site using OcPortal 4.x few years ago and now upgraded it to the latest 6 version and upgrade seems to run fine. I have tried to copy the installation to the live domain and failed. Neither OcPortal merge tool nor XML solution worked. During my experiments I have corrupted the source test site and tried to recover it using backup I've made prior to do anything related to create a live duplication of the test site.
However, now I am unable to recover the site :( Trying to run restore.php from backup files I get an error: "Key too long at 256 bytes [url_title_cache]" and recovery process stops. I have tried to use previous backup with version 4 but it just returns error 500 without any output from the script itself.
It seems I have done something very, very wrong… is there a way to recover at least the test site? I have full backup for it with the latest working version.


Last edit: by raven
Back to the top
 
Posted
Rating:
#68175
Avatar

Hi,

I imagine the merge tool would not work if the databases were on different servers (but might work if you could copy an SQL dump to the live server into a fresh database), MySQL usually is set up to restrict that. The XML tool is very advanced and not designed for migrating whole sites.

When going to a live server it is best to just transfer the files and database directly, and then edit info.php to make any small adjustments required.

We had some severe bugs in the backup system on old versions, so it will probably prove extremely hard to restore those databases. However if it is just test sites, I imagine there would not be a lot of important data in the database. Themes and translations and Comcode pages are all just files so can just be copied (lang/RU, */pages/comcode_custom/RU/*.txt, themes/<themename>).


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

Well-settled

Chris, thank you for the clearance. Am I correct that all domain-related differences are in info.php file? Then I am just an idiot… I was going to just copy files and database tables to the new domain and edit config files/database records to reflect new base url and database settings but… I've decided to go with a "nature" way :)
The main issue with database is that is contains LOT of catalogues created for this site. There are few thousands of records. I can see those records in install.php in previous version backup and restore.php in version 6 backup - they are over 30mb size and it seems they contain all database records but I can't have them to put them back to database :) Ah, am I correct that comcode pages will not require database records to function so my issue is really related to catalogues only?
I will try to check… some records are written in the database so possibly it will work with a clean install if I just copy catalogue tables there…

Ah, and I am sorry for the offtopic for the main question theme. I was just very upset and misunderstood the term "news" and thougt it was a general theme about critical errors :)
Back to the top
 
Posted
Rating:
#68183
Avatar

Hi,

"Am I correct that all domain-related differences are in info.php file?" - yes

"Ah, am I correct that comcode pages will not require database records to function so my issue is really related to catalogues only?" - yes

"I will try to check… some records are written in the database so possibly it will work with a clean install if I just copy catalogue tables there…" - that's going to be extremely difficult, different tables are highly interlinked

Don't you have a copy of the actual database installed somewhere, or a dump of it? That's all you should need.


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

Community saint

Chris,

This seems like an opportune time for me to ask about the best way to clone a site and any pitfalls to lookout for.

Currently I'm developing my site on a shared host, and before it goes live I want to copy the entire site (database and everything) to a new location on the same host and use the clone as my testing environment.

Can I literally just close my site, copy my base_url to base_url2, copy my database, tweak php.ini to reflect new base_url and database and I'm all set to go?

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68198
Avatar

Yes but info.php not php.ini


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

Community saint

Chris Graham said

Yes but info.php not php.ini
Of course, don't know where I got php.ini from.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68211
Avatar

Well-settled

Chris Graham said

Don't you have a copy of the actual database installed somewhere, or a dump of it? That's all you should need.
Unfortunately, I have relayed on full backup function and did not care about database dump :( And my hosting does file backup but not database for tech reasons. Actually, restore.php creates most of tables except the last ones (in alphabetical order) probably so I wanted to copy those tables it creates to the clean installation, then copy files from the full backup there and edit info.php to reflect new base_url and database settings. Hope it will work. Otherwise I will probably have to edit and part out a restore.php file as it seems to contain full database creation procedure, the process just does not go to the end for some reason (that "Key too long at 256 bytes [url_title_cache]" error). I hope if I make several smaller files with more simple structure from restore.php it will re-create the database successfully.
Back to the top
 
Posted
Rating:
#68212
Avatar

Well-settled

The last thing (if nothing else will work) I can do is to copy files from the full backup and re-create catalogues manually as they are stored in csv files. Though it will be a really tough process but it is still reasonably fine as pages are preserved with a file backup and they are the most difficult to restore as they all done manually and there are lot of them as well :)
Anyway, I am full of hope :lol:
Back to the top
 
Posted
Rating:
#68213
Avatar

url_title_cache isn't a very important table. If you can identify the lines in restore.php that relate to it and remove them then that may well work. Then you can recreate it in OcCLE with:

Code

         :$GLOBALS['SITE_DB']->create_table('url_title_cache',array(
            'id'=>'*AUTO',
            't_url'=>'URLPATH',
            't_title'=>'SHORT_TEXT',
         ));


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

Well-settled

Thanks Chris, will try it in the evening :thumbs:
Back to the top
 
Posted
Rating:
#68225
Avatar

Well-settled

Chris, I really can't thank you enough! :thumbs: The last solution you have offered to try has worked perfectly.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: