Fresh install of pro 2.2.4, error loading cs.js - blocking preview

Seeing a 500 error loading cs.js when attempting to view preview when editing a page.

Viewing the error in chrome dev console shows:

VM1698:1 POST https://sewdarnscrappy.com/ 500 (Internal Server Error)

Expanding this shows the following:
(anonymous) @ VM1698:1 send @ jquery.js?ver=1.12.4:4 ajax @ jquery.js?ver=1.12.4:4 (anonymous) @ cs.js?ver=3.2.4:124 (anonymous) @ cs-vendor.js?ver=3.2.4:2937 e @ cs-vendor.js?ver=3.2.4:2937 requestHTML @ cs.js?ver=3.2.4:116 generateIframe @ cs.js?ver=3.2.4:111 e._run @ cs-vendor.js?ver=3.2.4:854 (anonymous) @ cs-vendor.js?ver=3.2.4:847 setTimeout (async) r.setTimeout @ cs-vendor.js?ver=3.2.4:811 e.debounce @ cs-vendor.js?ver=3.2.4:846 st.debounce @ cs-vendor.js?ver=3.2.4:1757 generateIframeDebounce @ cs.js?ver=3.2.4:102 didInsertElement @ cs.js?ver=3.2.4:108 trigger @ cs-vendor.js?ver=3.2.4:2623 n @ cs-vendor.js?ver=3.2.4:2524 n.didCreate @ cs-vendor.js?ver=3.2.4:1118 e.commit @ cs-vendor.js?ver=3.2.4:650 e.commit @ cs-vendor.js?ver=3.2.4:670 a.commit @ cs-vendor.js?ver=3.2.4:1238 e._renderRoots @ cs-vendor.js?ver=3.2.4:1372 e._renderRootsTransaction @ cs-vendor.js?ver=3.2.4:1376 e._renderRoot @ cs-vendor.js?ver=3.2.4:1370 e._appendDefinition @ cs-vendor.js?ver=3.2.4:1367 e.appendOutletView @ cs-vendor.js?ver=3.2.4:1365 e.invoke @ cs-vendor.js?ver=3.2.4:800 e.flush @ cs-vendor.js?ver=3.2.4:789 e.flush @ cs-vendor.js?ver=3.2.4:803 e.end @ cs-vendor.js?ver=3.2.4:815 e._run @ cs-vendor.js?ver=3.2.4:854 e.run @ cs-vendor.js?ver=3.2.4:823 st @ cs-vendor.js?ver=3.2.4:1749 (anonymous) @ cs.js?ver=3.2.4:4 w @ cs-vendor.js?ver=3.2.4:2916 N @ cs-vendor.js?ver=3.2.4:2924 E @ cs-vendor.js?ver=3.2.4:2922 e.invoke @ cs-vendor.js?ver=3.2.4:800 e.flush @ cs-vendor.js?ver=3.2.4:789 e.flush @ cs-vendor.js?ver=3.2.4:803 e.end @ cs-vendor.js?ver=3.2.4:815 e._run @ cs-vendor.js?ver=3.2.4:854 e.run @ cs-vendor.js?ver=3.2.4:823 st @ cs-vendor.js?ver=3.2.4:1749 (anonymous) @ cs.js?ver=3.2.4:1729 (anonymous) @ cs.js?ver=3.2.4:1728 w @ cs-vendor.js?ver=3.2.4:2916 N @ cs-vendor.js?ver=3.2.4:2924 E @ cs-vendor.js?ver=3.2.4:2922 e.invoke @ cs-vendor.js?ver=3.2.4:800 e.flush @ cs-vendor.js?ver=3.2.4:789 e.flush @ cs-vendor.js?ver=3.2.4:803 e.end @ cs-vendor.js?ver=3.2.4:815 e._run @ cs-vendor.js?ver=3.2.4:854 e.run @ cs-vendor.js?ver=3.2.4:823 st @ cs-vendor.js?ver=3.2.4:1749 (anonymous) @ cs.js?ver=3.2.4:1736 (anonymous) @ jquery.js?ver=1.12.4:2 i @ jquery.js?ver=1.12.4:2 fireWith @ jquery.js?ver=1.12.4:2 y @ jquery.js?ver=1.12.4:4 c @ jquery.js?ver=1.12.4:4 XMLHttpRequest.send (async) (anonymous) @ VM1698:1 send @ jquery.js?ver=1.12.4:4 ajax @ jquery.js?ver=1.12.4:4 submitRequest @ cs.js?ver=3.2.4:1736 (anonymous) @ cs.js?ver=3.2.4:1726 (anonymous) @ cs-vendor.js?ver=3.2.4:2937 e @ cs-vendor.js?ver=3.2.4:2937 promise @ cs.js?ver=3.2.4:1726 requestBatch @ cs.js?ver=3.2.4:1728 e._run @ cs-vendor.js?ver=3.2.4:854 (anonymous) @ cs-vendor.js?ver=3.2.4:847 setTimeout (async) r.setTimeout @ cs-vendor.js?ver=3.2.4:811 e.debounce @ cs-vendor.js?ver=3.2.4:846 st.debounce @ cs-vendor.js?ver=3.2.4:1757 (anonymous) @ cs.js?ver=3.2.4:1723 (anonymous) @ cs-vendor.js?ver=3.2.4:2937 e @ cs-vendor.js?ver=3.2.4:2937 request @ cs.js?ver=3.2.4:1722 modelRequest @ cs.js?ver=3.2.4:1721 (anonymous) @ cs.js?ver=3.2.4:3 (anonymous) @ cs-vendor.js?ver=3.2.4:2937 e @ cs-vendor.js?ver=3.2.4:2937 _request @ cs.js?ver=3.2.4:3 findRecord @ cs.js?ver=3.2.4:2 (anonymous) @ cs-vendor.js?ver=3.2.4:10942 _fetchRecord @ cs-vendor.js?ver=3.2.4:10944 h @ cs-vendor.js?ver=3.2.4:10948 _flushPendingFetchForType @ cs-vendor.js?ver=3.2.4:10955 n @ cs-vendor.js?ver=3.2.4:1776 e.forEach @ cs-vendor.js?ver=3.2.4:1771 e.forEach @ cs-vendor.js?ver=3.2.4:1776 flushAllPendingFetches @ cs-vendor.js?ver=3.2.4:10947 e.invoke @ cs-vendor.js?ver=3.2.4:800 e.flush @ cs-vendor.js?ver=3.2.4:789 e.flush @ cs-vendor.js?ver=3.2.4:803 e.end @ cs-vendor.js?ver=3.2.4:815 e._runExpiredTimers @ cs-vendor.js?ver=3.2.4:861 _boundRunExpiredTimers @ cs-vendor.js?ver=3.2.4:811 setTimeout (async) r.setTimeout @ cs-vendor.js?ver=3.2.4:811 e._installTimerTimeout @ cs-vendor.js?ver=3.2.4:863 e._setTimeout @ cs-vendor.js?ver=3.2.4:854 e.later @ cs-vendor.js?ver=3.2.4:833 st.next @ cs-vendor.js?ver=3.2.4:1757 (anonymous) @ cs.js?ver=3.2.4:14 (anonymous) @ cs-vendor.js?ver=3.2.4:2937 e @ cs-vendor.js?ver=3.2.4:2937 model @ cs.js?ver=3.2.4:13 deserialize @ cs-vendor.js?ver=3.2.4:2025 (anonymous) @ cs-vendor.js?ver=3.2.4:2789 e.runSharedModelHook @ cs-vendor.js?ver=3.2.4:2789 n.getModel @ cs-vendor.js?ver=3.2.4:2809 w @ cs-vendor.js?ver=3.2.4:2916 N @ cs-vendor.js?ver=3.2.4:2924 E @ cs-vendor.js?ver=3.2.4:2922 e.invoke @ cs-vendor.js?ver=3.2.4:800 e.flush @ cs-vendor.js?ver=3.2.4:789 e.flush @ cs-vendor.js?ver=3.2.4:803 e.end @ cs-vendor.js?ver=3.2.4:815 e._run @ cs-vendor.js?ver=3.2.4:854 e._join @ cs-vendor.js?ver=3.2.4:853 e.join @ cs-vendor.js?ver=3.2.4:824 st.join @ cs-vendor.js?ver=3.2.4:1749 (anonymous) @ cs-vendor.js?ver=3.2.4:1753 i @ jquery.js?ver=1.12.4:2 fireWith @ jquery.js?ver=1.12.4:2 ready @ jquery.js?ver=1.12.4:2 K @ jquery.js?ver=1.12.4:2

Hi @bluepandastudios,

Thanks for reaching out.

That’s just displaying javascript traces but not the actual error, it’s best to check the error from your site’s error logs since it’s internal. Or please provide your site’s URL, Admin, and FTP login credentials in a secure note and we’ll check the details of the internal error.

For the meantime, please follow these :

  1. Ensure everything is up to date according to our version compatibility list at https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195. Please follow the best practices when updating your theme and plugins. See https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62 for more details.

  2. Clear all caches including browser cache then deactivate your caching plugins and other optimization plugins.

  3. If you’re using a CDN, please clear the CDN’s cache and disable optimization services.

  4. Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  5. Remove custom CSS, Javascript and templates.

  6. Reset your htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.

  7. Contact your host to increase your allocated memory or do it yourself by adding this code in your wp-config.php

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

Thanks.

Hi @empmdk,

Could you please create a separated ticket with all the information again?

Provide the information in this ticket will be visible to the topic owner as well.

Thank you.

So, in absolute frustration, I removed the Pro theme, and installed the stability release version (2.1.6). This had previously worked, and lo and behold, it worked with no issue. I proceeded to update it to 2.2.4, and everything seems to be functioning properly. ¯\_(ツ)_/¯

Hey @bluepandastudios,

500 errors are mostly caused by incorrect server permissions. Not sure how you installed at first but updating from an old version might have circumvented that error.

Thanks.

It’s not a server permission issue, and I might have spoken too quickly. Everything worked fine, then I installed woocommerce, back to the same issues again!!

Your compatibility matrix (https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195) shows the latest supported version of woocommerce to be 3.4.2, however, clicking to install woocommerce from the pro plugin screen installs 3.4.3. Once installing and activating, I immediately see the issues described above.

So I’ve definitely traced this back to woocommerce installation. I downloaded a copy of 3.4.2 and it shows the same issue. At this point, I don’t seem to be able to use woocommerce with pro?

Hi @bluepandastudios,

Could you please provide us with your FTP account as well?

Thank you.

updated the secure note to include ftp account

Hey @bluepandastudios,

Based on what you described, it seems like the issue is coming from when you install something in your site. I have successfully logged in using your FTP credentials but I get an empty directory. Please provide the correct access.

I also see you’re using the old version. Please update to the latest version.

Thanks.

I’ve fixed the ftp location, and updated to the latest version.

Ok, so I don’t know if these get archived, or if you want to make note of this, but in my case, the issue was that the response returned when loading the preview exceeded a mod_security rule. In my case, my server running cPanel utilizes the Comodo ModSecuirty Apache Rule Set [1]

It appears that the rule handling response body size (15_Outgoing_FilterGen.conf) was being hit. It is configured to drop the response. Thus, it returns a 500 error. This was visible by tailing /usr/local/apache/logs/error_log where I saw the following

[Sun Jul 22 20:56:14.408980 2018] [:error] [pid 23829:tid 140193696835328] [client 12.34.56.78:51629] [client 12.34.56.78] ModSecurity: Output filter: Response body too large (over limit of 524288, total not specified). [hostname "example.com"] [uri "/index.php"] [unique_id "W1UnrfZH2S3cgtTIZHT6TwAAAAQ"], referer: https://example.com/pro/

The solution was to disable this rule, 15_Outgoing_FilterGen.conf

I’ve tested my server with the default set of cPanel provided ModSecurity rules, and it does not exhibit this behavior.

At this point, I think this matter can be put to bed, but I would highly recommend documenting this, or some variation of it, as potential solutions for future intermittent issues with displaying the preview for the editor if no other solutions work (server memory, etc).

1 Like

Hello There,

We are just glad that you have figured the cause of the issue and finally resolve it.
Thanks for letting us know!

Best Regards

Hello @bluepandastudios,

This ticket I showing up in the list of unresolved ticket list. Upon checking I am unable to figure out if any new update was posted here. The last reply I see is from my colleague @RueNel. Can you please confirm for updates?

Thanks.

This ticket can be closed.

Again, I would highly recommend documenting this for future support cases as I found myself incredibly frustrated with lack of solutions based on memory, plugins, etc.

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.