*

OP

  • **
  • 6 posts
The free ad importer (version 0.6 or 1.0) was working smoth with osclass 4.1 and previous versions. After upgrade to Osclass 4.2, the import process will stuck in the begining if found any ad with image. Only plain text ads without image can be completed succesfully.

The problem happens on all themes I have.


*

MB Themes

@OP
Check your browser console as well as error log.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

OP

  • **
  • 6 posts
Thank! @MB Themes

Below is what I can see from the web browser console and debug log. Any ideas? Cheers!


Web browser console

Code: [Select]
jquery.min.js:2 GET mysite.com/oc-admin/index.php?page=ajax&action=custom&ajaxfile=xml_importer/ajax.php&subaction=parsead&importfile=%2Fhome%2Fbluewebs%2Fpublic_html%2Fmysite.com%2Foc-content%2Fuploads%2Fxmlimporter_ads.temp&num_ad=0&cat_info=&meta_info= 500

Debug log file

Code: [Select]
[13-Dec-2020 02:49:21 Europe/London] PHP Warning:  Illegal string offset 'error' in /home/bluewebs/public_html/mysite.com/oc-content/plugins/xml_importer/index.php on line 201
[13-Dec-2020 02:49:21 Europe/London] PHP Fatal error:  Uncaught Error: Cannot use string offset as an array in /home/bluewebs/public_html/mysite.com/oc-content/plugins/xml_importer/index.php:201
Stack trace:
#0 /home/bluewebs/public_html/mysite.com/oc-content/plugins/xml_importer/index.php(68): xmlimporter_ad(Object(DOMElement), Array, Array)
#1 /home/bluewebs/public_html/mysite.com/oc-content/plugins/xml_importer/ajax.php(15): xmlimporter_adfromfile('/home/bluewebs/...', '0', Array, Array)
#2 /home/bluewebs/public_html/mysite.com/oc-admin/ajax/ajax.php(508): require_once('/home/bluewebs/...')
#3 /home/bluewebs/public_html/mysite.com/oc-admin/index.php(132): CAdminAjax->doModel()
#4 {main}
  thrown in /home/bluewebs/public_html/mysite.com/oc-content/plugins/xml_importer/index.php on line 201

*

MB Themes

@oP
I would check that line #201 in index.php of plugin
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Admir Husić

  • *
  • 3 posts
Same issue here. Does anybody have a fix for this?

*

MB Themes

@Admir
Solution was proposed, to check this line:
Code: [Select]
Uncaught Error: Cannot use string offset as an array in /home/bluewebs/public_html/mysite.com/oc-content/plugins/xml_importer/index.php:201
Connecting osclass version to this version is not correct, as error is thrown because of PHP version and insufficient error handling in plugin.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Admir Husić

  • *
  • 3 posts
@MB Themes

Every time i try to import ads, I recieve the error:

"0 ads were imported1 ads failed to import(Ads numbers: #0 : Category invalid. )". Im using the XML file which is included in the plugin, so I think the format should be fine. Any ideas?





 

*

MB Themes

Category invalid means that category defined in xml does not exists in your osclass installation.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Admir Husić

  • *
  • 3 posts
Category invalid means that category defined in xml does not exists in your osclass installation.

What do you mean with it does not exist in the osclass instalation?

I have manually created a new category in settings -> categories. And this category is referenced in the XML file.


For example I created the category "Cars", and the reference in the XML file looks like this:

<category>Cars</category>

I also tried (for testing purposes) to remove completely the <category> tag from the XML, and the message still the same. 

*

MB Themes

@Admir
I do not mean anything, just telling you what that error means.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots