Cornerstone editor not working: typeerror: cannot read property ‘indexof’ of undefined in getStack()

Hi,

Note: I posted a question about an error I got after updating Cornerstone some time ago. I was a bit late replying and the thread got closed. Then someone of your team opened it again and said it should remain open unless there is no activity for 10 days but it’s been six days since the last reply and it looks like I can’t reply anymore?
Please see this for the topic: https://theme.co/apex/forum/t/cornerstone-editor-not-working-typeerror-cannot-read-property-indexof-of-undefined-in-getstack/15133

Anyway, trying to re-open this. I updated the X Theme (and the included Cornerstone, I presume?) to the latest version. I’ll update the account I created and add admin rights. I have to remove those rights on Friday 1:00 PM (CET) because we’d rather not leave it open during the holidays when few people are in the office. Is this sufficient?

Hi There,

Thanks for writing in! I have tried to load your master site, but I’m getting the following error.

By the way this is not security certificate error. Could you please confirm on your end? so that we can check your original issue.

Thanks!

Oops I think one of our admins was just installing updates. It should work now. Oh, also, you probably want to add /wp-admin to that url :slight_smile:

Hi there,

Please find the possible solution from this thread. This has same problem like you and got resolved.

Let us know how it goes.

If I understand the topic you linked to correctly, the issue was that cs-vendor.js was not present on the server…?

This seems not to be my issue since the error stacktrace I’m getting points to a call defined in cs-vendor.js:

TypeError: Cannot read property 'indexOf' of undefined
    at getStack (cs-vendor.js?ver=2.1.7:19456)
    at defaultDispatch (cs-vendor.js?ver=2.1.7:19500)
    at Object.dispatchError (cs-vendor.js?ver=2.1.7:19483)
    at onerrorDefault (cs-vendor.js?ver=2.1.7:33226)
    at Object.trigger (cs-vendor.js?ver=2.1.7:51931)
    at cs-vendor.js?ver=2.1.7:52925
    at invoke (cs-vendor.js?ver=2.1.7:1335)
    at Queue.flush (cs-vendor.js?ver=2.1.7:1399)
    at DeferredActionQueues.flush (cs-vendor.js?ver=2.1.7:1207)
    at Backburner.end (cs-vendor.js?ver=2.1.7:521)

I tried it anyway and “wp-content/plugins/cornerstone/assets/dist-app/js/cs-vendor.js” is reachable on our server.

I also tried the 2nd solution (removing cornerstone from plugins folder, then letting X install it automatically) but I get the same error - except for one notable difference: it does work when I try to use it from the master site (wp..domain.com) but when I try to edit a page on the sub-site (.domain.com), then I get the error.

So I still think this is a migration error, going from 1.3 straight to the latest version (2.x)?

Update: heh. When I’m in the editor (/x/#/content) and click the title of a content page it works! But when I try to open it via the “EDIT” button (or "Edit in Cornerstone from the WP dashboard > Pages) it does not work???

Update #2: Oh wait that’s just viewing the page. So editing doesn’t work. Viewing does.

Hi There,

Can you install this plugin (https://wordpress.org/plugins/wp-serverinfo/) then head over to Dashboard -> WP-Serverinfo and then post the following following information, so that we can assist you accordingly.

-PHP version
-PHP Memory Limit
-PHP Max Script Execute Time

Thanks!

Hi,

PHP Version 7.0.15
memory_limit 256M
max_execution_time 300

Hello There,

Could you please give us access to the main site? We need to check the whole network site set up. Meanwhile, please make sure that SSL/HTTPS is correctly set up. The site url in Network > Sites must be the same with the dashboard URL to avoid any issues.

Please let us know how it goes.

Ah I forgot to tick the “Super Admin” checkbox for your account. You should be able to switch to Network Admin now.

Regarding https: our certificate doesn’t cover *.subdomain.domain.com, only subdomain.domain.com so… we can’t :frowning: That said, it’s just a development environment so it shouldn’t matter…?

And what do you mean by “site url in Network > Sites must be the same [etc]”? Anyway, you should be able to check this yourself, now.

Thanks so far btw :slight_smile:

Hi There,

Now we can access your Master site, but eventually it will logout when loading.

Can you please use the same logins provided for us and check that, so that you will see the issue.

Thanks!

Hi there,

Sry I became a victim of the flu epidemic that’s currently sweeping through our country so I haven’t replied for a while.

I just logged into the master site using the credentials I created for you and everything seems fine (I’m not logged out, at least not for several minutes).

I do have to (re)login when I go to the subsite admin (KL) because it runs on a different subdomain (and the session doesn’t exist for that domain). Is that what you mean?

Hi there,

We’re able to access the main site, but no matter workaround I tried, the sub-site isn’t accessible on my end. Both the .com and .nl are down.

Thanks!

See private note (I’ll add it right after I post this).

Just to be sure; by Master Site we’re talking about (1) and Sub Site is (2)?

I just checked and both sites seem to work fine on my end (also tried via mobile data to double check if the domains’ DNS records are working).

Hi there,

Thanks for posting in.

I tried using proxy and vpn, plus pointing my hosts file to your site’s IP, it still not accessible. Is there a security access that blocks access to that sub-site? Could you try providing a visual procedure on how you’re accessing it?

Thanks.

Hi there. I just tested the sites again and somehow I got a “DNS could not be resolved” error for one of the sites. I think there is some confusion about what the Master Site and what the Sub Site is so just to be clear:

Master site: wp.sub.domain.nl
Sub site: sub.domain.nl

The reason for this config is a long story :slight_smile:

Anyway. I tested my access via a remote route with [see secure note] in my /etc/hosts file and that should work.

Hi there,

Another support staff here. I followed exactly what you have mentioned in the Secure note and added the IPs to my host file on my Mac as you mentioned, but unfortunately, it is still not possible to access your website.

I feel that the complex nature of your website and domains configuration plays an important role in the problem you are experiencing regarding the Cornerstone usage.

Would you please kindly follow up the steps below yourself and get back to us with the result:

  1. Ensure everything is up to date according to our version compatibility list here. Please follow the best practices when updating your theme and plugins. Click here for more information.
  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 see 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 and Javascript from the options or Child Theme and test the case.
  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. Increase the PHP Memory Limit of your server. Click here for more detailed information and how to increase the PHP memory limit.
  8. Follow the steps mentioned here: https://theme.co/apex/forum/t/troubleshooting-builder-preview-warnings/14404

These are the testing cases that I could think of without accessing your website. I tried to be as helpful as I can and share with you the common possibilities regarding the Cornerstone problems.

Thank you.