Skip Navigation

[Résolu] JS Errors in admin area since last upgrade

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
Views was causing JS errors on a client site that were difficult to identify the source of and which were only visible on the client's own server. Installing the site on a different server resolved the problem.

Solution:
Toolset requires the mbstring PHP module, which on some PHP 7 server installations is not enabled by default. The server settings needed to be updated to enable mbstring module.

Relevant Documentation:

This support ticket is created Il y a 6 années et 6 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Ce sujet contient 43 réponses, a 3 voix.

Dernière mise à jour par Nigel Il y a 6 années et 6 mois.

Assisté par: Nigel.

Auteur
Publications
#911130

OK, great.

Do you have WP Debug active?
Is the WP Config file ready?

If so, then the issue throws still no JS error (I do not see any), but the editor is still broken.

I actually would prefer to see the FTP - just see it.
I need to see if the cache is deleted, as there where cache files and folders which can stop the files from loading).

I will not edit anything in the FTP apart from an eventual true/false to the WP Debug.

I would advise you here in turn in case something else needs to be removed.
I will as well remove the hide-my-page again, but re-enable it after ca. 10 minutes.

#911138

Beda - if you want to carry on working on this - please paste in from the previous message what you want the wp-config to be

I am not giving you FTP access - you have proven you cannot follow a simple request to leave a plugin enabled - why would I trust you with FTP access?

#911139

Beda - seeing as we are going in circles here - can you go to the message of June 8, 2018, at 12:47 pm - and delete all the content that is my config file - I do not want that on a public server that can be indexed - since it has private information in there

Then tell me what you want the config file to be - and I will amend it accordingly

#911140

OK this is no problem.

I asked Amit our Toolset Support Manager to reply to your concern, and another Support Person will take care of this.

BTW; I offer it the last time, as I already did:
we can offer servers for this, which resolves the whole pain of the site being accessible.

However, this is not how I can debug a site. Let's see if someone else of the team can spot and nail this issue once and for all, that is all I wish - that the backend becomes re-usable for you, as fast as possible.

#911141

Beda - you could not follow one simple request - you appeared to be deliberately ignoring that request - that is just rude on your part and pretty stupid too

Have you cleared out the config from the message on June 8, 2018 at 12:47 pm as I asked?

#911154

I apologize for this mistake, I hope you had no fatal cause because of my stupidity.

Yes, I deleted the config you shared with me.

Nigel will reply you here very soon probably, I hope he will have better luck explaining how to proceed, as:
- we cannot see The JS reported error on your own copy of the site, neither locally not on your own duplicate server that you have set up (at least, I do not find it in any location)
- we can see the problem with the Buttons and Tabs not responding in post body editors and above it/around it only on the copies living on your server, where cache and other things are used - not on any of the 3 installs I made locally.

Wether or not, and what exactly, the issue is, is determinable only once we can follow the mandatory debug steps on either of the services (your server, our server, any server, it does not matter, the best is thou locally, as a developer will ALSO need to see this happening to fix it)
Or, the very very least, is a copy of the site where the issue is visible can replicable, and as you see, this is until now not existent.

Let's wait for Nigels genius here, together we will solve this issue too.

#911156

I have gone one further - i have removed all plugins to another folder - except for three - and the issue is STILL there

#911168

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi David

Nigel here. I see we are still stuck on this.

I visited the test server you made available.

I activated Types which was de-activated.

I spent some time in the backend trying to observe errors but couldn't see any.

I notice that you had the twentyseventeen theme active. I recall that the problem only occurred with the Flatsome theme active, so I switched themes to Flatsome.

Then I could see the errors again when I went to edit a post.

Now, before, I used a database dump of your site installed in a local site where I had the same set up, just Types and Views active, using a copy of the Flatsome theme, and I could not reproduce the errors.

So there seems to be something specific to your server responsible—or possibly your copy of Flatsome.

I deleted the copy of Flatsome from your test site and uploaded the version I have installed locally to rule out that your copy was corrupted or modified.

That didn't make any difference.

So that just leaves your server.

What is really puzzling is that the errors are reported with 500 error code, meaning a fatal PHP error, and yet you say these are not shown in your logs, so we haven't nothing to go on about the cause.

That's where I'm at, I'll just try one more thing an update your shortly.

#911170

Hi Nigel ...

When you say 'I spent some time in the backend trying to observe errors but couldn't see any' - was the post editor working for you - could you see the toolbar and switch between tabs?

#911178

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

The toolbar is fine, but I just found that I cannot switch between tabs when Views in active (this with twentyseventeen).

No errors reported in the console, which I see with Flatsome active.

However, I just checked the same on my local install of your site and I still can't reproduce.

I also uploaded the copy of your site I have installed locally onto one of our servers. You can see that (and log into it with your own credentials) here: lien caché

You can see there are no problems editing posts (or errors in the console) regardless of which theme is active.

So, this appears to confirm that it is something specific to your server responsible for the issue.

I'm not a server expert, so I will ask our server team if they have any useful input.

#911198

Let me know if you want me to link you up with the server guys at my hosting co

#911730

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi David

The only feedback that our server team had is that it could relate to a dependency on the PHP module mbstring (we can't see the 500 error to know as you say there is nothing visible in the logs).

mbstring is a common PHP library that was included by default in PHP 5, but is not in some PHP 7 installations.

We are removing the dependency on this module, but in the meantime you can ask your host to verify that it is enabled on your server (as I say, it is a common library and that should not be a problem).

If they do then let me know how that affects your test installation.

#912052

MBString - was disabled - enable it and the errors all disappear

Now - what is the solution long term? Re-disable it and you chaps work around it - or leave it enabled and you don't?

It looks a lot like you have cracked it Nigel!

#912176

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi David

That's great news.

You can leave the mbstring module enabled (it is a common module). Because it is no longer enabled by default in some PHP 7 installations we began the process of removing our dependency on it in the last updates, but it seems we missed a few cases with Views, and are doing a sweep across all of the plugins to complete that.

So as we roll out updates the dependency should disappear, but there is no harm in leaving the module enabled for now.