delatbabel / redmine-migrator

Migrate a project from redmine instance to redmine instance using the API
MIT License
9 stars 4 forks source link

parser error : Start tag expected, '<' not found #2

Open homer242 opened 7 years ago

homer242 commented 7 years ago

Hi,

I tried to run your php script but it fails. I checkout the source and retrieved the libraries package from composer yesterday.

I think I have the right configuration but there is an error from SimpleXMLElement. As I understand, a POST request returned an empty answer and this is why there is this exception. What can I do to fix that ?

Processing issue ID 1, Recording - implement the functionality, Status: New
PHP Notice:  Undefined index: assigned_to in /home/avd/rephub/redmine-migrator/runme.php on line 381
PHP Notice:  Undefined index:  in /home/avd/rephub/redmine-migrator/runme.php on line 381

Destination Issue Data
======================

Array
(
    [project_id] => 1
    [tracker_id] => 2
    [status_id] => 1
    [priority_id] => 2
    [subject] => Recording - implement the functionality
    [description] => 
    [assigned_to_id] => 
    [author_id] => 3
    [estimated_hours] => 180
)
PHP Warning:  SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Client.php on line 645
PHP Warning:  SimpleXMLElement::__construct():   in /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Client.php on line 645
PHP Warning:  SimpleXMLElement::__construct():  ^ in /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Client.php on line 645
PHP Fatal error:  Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Client.php:645
Stack trace:
#0 /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Client.php(645): SimpleXMLElement->__construct(' ')
#1 /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Client.php(680): Redmine\Client->processCurlResponse(' ', 'application/xml')
#2 /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Client.php(263): Redmine\Client->runRequest('/issues.xml', 'POST', '<?xml version="...')
#3 /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Api/AbstractApi.php(64): Redmine\Client->post('/issues.xml', '<?xml version="...')
#4 /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Api/Issue.php(136): Redmine\Api\AbstractApi->post('/issues.xml', '<?xml version="...')
#5 /home/avd/rephub/redmine-migrator/runme.php(393): Redmine\Api\Issue->create in /home/avd/rephub/redmine-migrator/vendor/kbsali/redmine-api/lib/Redmine/Client.php on line 645

(I enabled some debug messages in your php script as you can see).

geekforfree commented 5 years ago

Any update about this?

delatbabel commented 5 years ago

Sorry, I've been unwell for an extended period and not doing any coding at the moment. Last time I checked I couldn't reproduce the problem -- obviously caused by something that the migrator is trying to read from the source redmine that isn't present. If someone can identify what that is then it would help.