No Import eval_field causes “unterminated string literal”-SyntaxError
-
Hello,
I tried to export and import products from one wooCommerce-shop to a new instance using this plugin. After passing the file-upload and clicking submit at the “mapping”-page. Nothing happens. This means the screen only shows the loading-animation. In my firefox-developer-tools I can find the error-Message:”SyntaxError: unterminated string literal”Clicking on the linked pointer gets me to the following lines:
function import_rows( start_pos, end_pos ) {
var data = {
action: ‘woocommerce_csv_import_request’,
file: ‘/[private path cutted out by me]/demoshop/wp-content/uploads/2017/04/Woocomm2.csv-4.txt’,
mapping: ‘{[cutted out by my for better reading, I can provide if needed}’,
eval_field: ‘<br />
<b>Warning</b>: json_encode() expects exactly 1 parameter, 2 given in <b>/[private path cutted out by me]/demoshop/wp-content/plugins/product-import-export-for-woo/includes/importer/class-wf-prodimpexpcsv-product-import.php</b> on line <b>148</b><br />’,When I look in the fiel class-wf-prodimpexpcsv-product-import.php I can see the line:
eval_field: ‘<?php echo stripslashes(json_encode(($_POST[‘eval_field’]),JSON_HEX_APOS)) ?>’,Maybe the problem is because on the “mapping”-page there is an array of eval_field.
During the process I left the “mapping”-page filled out as it was with no content in the eval_fields.I hope you understand my problem.
Can you please help me or give me any hint?
Regards,
Philipp
- The topic ‘No Import eval_field causes “unterminated string literal”-SyntaxError’ is closed to new replies.