Jump to content

Product details saving issue in BO


Kunsthelden

Recommended Posts

Dear developers,

I kindly ask for your assistance as I'm getting an error I don't know where to trace or solve. On BO in products detail page I'm getting an error when clicking on deactive or activate (Prestashop 1.7.2.x). System prompts that action was not successful with JSON error:

SyntaxError: JSON.parse: unexpected character

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data,  main.bundle.js:56382:9

I also check JSON doc where it's said that there is a comma too much at the end that is causing this issue. Unfortunately, I canont find any useful on line one of main.bundle.js.

Updated: I have seen that there is a discussion about saving issues in Firefox with Prestashop 1.7. Maybe this is realated. I have tested and get saving issues too. But different to the others I see error messages as mentioned including a new one indication also an issue with scrollbars (sorry, cannot re-produce right now).

May I ask where I can solve this issue?

Kind regards,

PR

 

Code attached from line 56330 to 56383. I use Firfox at the moment. Issue comes - funny wise - from line with Android (second last line).

// Support: Firefox
// Firefox doesn't have focus(in | out) events
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
//
// Support: Chrome, Safari
// focus(in | out) events fire after focus & blur events,
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
if ( !support.focusin ) {
	jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {

		// Attach a single capturing handler on the document while someone wants focusin/focusout
		var handler = function( event ) {
			jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
		};

		jQuery.event.special[ fix ] = {
			setup: function() {
				var doc = this.ownerDocument || this,
					attaches = dataPriv.access( doc, fix );

				if ( !attaches ) {
					doc.addEventListener( orig, handler, true );
				}
				dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
			},
			teardown: function() {
				var doc = this.ownerDocument || this,
					attaches = dataPriv.access( doc, fix ) - 1;

				if ( !attaches ) {
					doc.removeEventListener( orig, handler, true );
					dataPriv.remove( doc, fix );

				} else {
					dataPriv.access( doc, fix, attaches );
				}
			}
		};
	} );
}
var location = window.location;

var nonce = jQuery.now();

var rquery = ( /\?/ );



// Support: Android 2.3
// Workaround failure to string-cast null input
jQuery.parseJSON = function( data ) {
	return JSON.parse( data + "" );
};

 

 

 

Edited by Kunsthelden (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...