Page 1 of 1

Cannot migrate from 0.9.1 to 0.9.2 using backup/restore util

Posted: 11 Apr 2015, 22:25
by scott1981
I am trying to migrate using the backup/restore function on cats but I am unable to do so. I created a folder caller restore under cats folder and then placed catsbackup.bak (49.34 mb which includes db + attachments) I got from my production instance running 0.9.1. I also created a new db and assigned a user with all priviliges so that the db test connectivity shows success.
During the install process I selected "Delete existing data and restore a previous OpenCATS installation from backup" and after it starts to reindex resumes (Please wait while your unindexed resumes are reindexed...)
I get the following error without being able to finish the install process:

Strict Standards: Non-static method DOMDocument::loadXML() should not be called statically, assuming $this from incompatible context in /home/vro/public_html/internal/ats/lib/DocumentToText.php on line 430

Fatal error: Call to a member function saveXML() on a non-object in /home/vro/public_html/internal/ats/lib/DocumentToText.php on line 431


It is worth mentioning that I do not have antiword installed, therefore I unchecked all of the document converters during install (doc, pdf and html).

What can I do?

Thanks.

Re: Cannot migrate from 0.9.1 to 0.9.2 using backup/restore

Posted: 12 Apr 2015, 18:24
by scott1981
A friend of mine that is php capable made the following modifications to lib/DocumentToText.php
and changed from this:

//$xml = DOMDocument::loadXML($data, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);

to this:

$xml = new DOMDocument();
$xml->loadXML($xml_datas, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);

That took away errors in lines 430 and 431

Also we experiencing this error when clicking under any candidate record

Query Error -- Report to System Administrator ASAP

MySQL Query Failed: Table 'vro_ats_new.candidate_tag' doesn't exist

SELECT
t1.tag_id,
t1.tag_parent_id,
t2.title AS tag_parent_title,
t1.title AS tag_title
FROM
tag t1
LEFT JOIN
tag t2 ON t2.tag_id = t1.tag_parent_id
WHERE t1.site_id = 1 AND
t1.tag_id IN (SELECT tag_id FROM candidate_tag WHERE candidate_id = 1277)
ORDER BY IFNULL(t1.tag_parent_id, t1.tag_id), t1.tag_id

which was fixed with adding for the tag table under mysql

Can this be fixed under 0.9.2? The upgrade script seems a little broken.

Thanks

References:

http://stackoverflow.com/questions/2263 ... entloadxml and http://www.opencats.org/forums/viewtopic.php?f=2&t=305