OpenCart 2 error: SyntaxError Unexpected End of Input OK

We have noticed that some clients are experiencing an error when they try to edit orders on their websites. This looked quite strange, as there are no indications in the error logs for the cause.

After further investigation, we have discovered that the issue is causing troubles for a lot of OpenCart users. There are open issues on GitHub OpenCart Issue and StackOverflow OpenCart Issue that describe the error in details. Still, if you are experiencing such an error message as well, there is a way to fix that completely. Here is what you can try, in order to resolve the error message.

Resolve Error Message in OpenCart 2

Disable Maintenance Mode

The first thing you need to consider is to disable maintenance mode on your website if you are using this feature. It may be causing the error message in question on your website so you can test that first. Simply log into the admin area of your website and locate the System option from the left-side menu. Then click on the Settings button.

Disable Maintenance mode in OpenCart 2

Choose your store and click on the Edit button next to it.

Choose an OpenCart 2 Store and Click on Edit

Select the Server tab and scroll down to the Maintenance Mode option. Set it to No and Save the changes.

Find the Maintenance Mode in OpenCart 2 and Disable it

Remove Password Protection

If you have password-protection for your OpenCart installation, this may be causing the error message in question as well. It is important to remove the password protection on your website and test editing of the orders again.

Generate User API

If the above techniques do not work, there is a third cause for the error as well. Log into your OpenCart administrative area and locate the System option on the left-side menu. Select Users and then API.

Find API in the Users Section of OpenCart 2

Click on the Add New button to create a new API on your website. Edit the following two fields:

Username: Enter a long username with letters and numbers. It doesn’t have to make sense, but to be secured.

Password: Generate a password

Status: Set the status to Enabled.

When you are ready, click on the Save button to keep the changes.

After that, select the System tab from the main menu again and click on the Settings option. Select your store and click on the Edit button next to it. On the next page, select the Options tab and scroll down to the Checkout section. Select the user you have created above from the API User drop-down box.

Checkout Menu in OpenCart 2

The issue with the error message when editing orders on your OpenCart 2 website should now be fully resolved. Still, note that FastComet offers free 24/7 technical support assistance on each SSD OpenCart Hosting plans. If you are not able to fix the error yourself, you can always request assistance from our team via your FastComet Client Area.

Daniel

Daniel is Director of Technical Support at FastComet. He has dedicated more than ten years toward bridging gaps between customer satisfaction and technical support. As the leader of our support organization, he’s responsible for educating, empowering and recognizing our support team and focusing on the science and art of quality, productivity, and technical prowess. He likes to be challenged with the tasks and do the research to approach the goal desired.