Support forums

Please check @brandnewbox_uk for support status updates.

Search     Advanced Search
Split() deprecated error - even with encloser=“QUOTE” parameter  
Posted: 03 May 2012 05:42 AM —  
Newbie
Rank
Total Posts:  25
Joined  2011-04-07

Hi Andrew,

Thanks for the super plugin. We have an older 1.x site that we need to import some entries via CSV file.

Regretfully, it’s spitting out this error:

Deprecated: Function split() is deprecated in /public_html/pfeengine/plugins/pi.csvgrab.php on line 88 Deprecated: Function split() is deprecated in /public_html/pfeengine/plugins/pi.csvgrab.php on line 93

TRACE: Array ( [title] => Array ( [is_custom] => 1 [field] => 1 ) [date] => Array ( [is_custom] => 0 [field] => ) [sku] => Array ( [is_custom] => 1 [field] => 3 [id] => 257 [format] => none ) [url] => Array ( [is_custom] => 1 [field] => 4 ) [redirect_url] => Array ( [is_custom] => 1 [field] => 5 [id] => 259 [format] => none ) [upc] => Array ( [id] => 258 [format] => none ) )
Warning: fopen(http://www.petfoodexpress.com/_qrcodes/qrcodes_test.csv): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /www/eh13549/public_html/pfeengine/plugins/pi.csvgrab.php on line 192

TRACE:
Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /public_html/pfeengine/plugins/pi.csvgrab.php on line 202 Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /public_html/pfeengine/plugins/pi.csvgrab.php on line 202 Warning: array_unshift() expects parameter 1 to be array, null given in /public_html/pfeengine/plugins/pi.csvgrab.php on line 211

TRACE: 2 -
Checking:
Deprecated: Function split() is deprecated in /public_html/pfeengine/plugins/pi.csvgrab.php on line 582 Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 32 bytes) in /public_html/pfeengine/db/db.mysql.php on line 383

The template is at http://www.petfoodexpress.com/sku/importer:

{exp:csvgrab url="http://www.petfoodexpress.com/_qrcodes/qrcodes_test.csv" 
    weblog="32" 
    title="Title"
    skip="1"
    delimiter=","
    encloser="QUOTE"
    stagger="10"
    offset="1600"
    use="1|3|4|5" 
    fields="title|sku|url|redirect_url" 
    unique="sku"
    trace="true" 
}

Is there something I’m missing? Thanks!

Profile
 
Posted: 03 May 2012 11:25 AM —   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1357
Joined  2006-04-12

Hi,

PHP’s split function has been removed from recent versions. Can you try the version of csvgrab that is here:

https://bitbucket.org/ajweaver/csvgrab

I think this should fix it.

Andrew

Profile
 
Posted: 03 May 2012 05:35 PM —   [ # 2 ]  
Newbie
Rank
Total Posts:  25
Joined  2011-04-07

Hi Andrew,

Thanks for the updated plugin! Now the split() error is gone, but no entries are being grabbed either. Here’s the traced message:

TRACE: Array ( [title] => Array ( [is_custom] => 0 [field] => 0 ) [date] => Array ( [is_custom] => 0 [field] => ) [expiry_date] => Array ( [is_custom] => 0 [field] => ) [sku|url|redirect_url] => Array ( [is_custom] => 1 [field] => 2|3|4 ) [sku] => Array ( [id] => 257 [format] => none [type] => text ) [upc] => Array ( [id] => 258 [format] => none [type] => text ) [redirect_url] => Array ( [id] => 259 [format] => none [type] => text ) )

TRACE: Resource id #88

And the updated template:

{exp:csvgrab 
 url="http://www.petfoodexpress.com/_qrcodes/qrcode_A4.csv" 
    weblog="32" 
    title="0"
    skip="1"
    delimiter=","
    encloser="QUOTE"
    stagger="10"
    offset="1600"
    use="2|3|4" 
    fields="sku|url|redirect_url" 
    unique="sku"
    trace="true" 
}

That runs at http://www.petfoodexpress.com/sku/importer
Also attaching a screenshot of the CSV file itself.

Thanks VERY much for the help. Really appreciate it Andrew!

Profile
 

‹‹ Erros attempting to import      Field Import error ››

Select A Theme