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
#907681

Ok, then we really need a copy of this install to replicate the issue as it's not happening on a clean, fresh install or an updated install.

Problematic is that I cannot confirm the Plugins have been replaced on the provided install.
It is still running the old Plugins, hence I can not confirm the error either.

We need:
- a copy (dump) of the database
- the zipped up FTP content of your WordPress install

Please zip these files up and share them with us in Google Drive or other similar services.
You can share them with "anyone who has this link" and then pass the link to me in the next reply.

I will then try to see this error locally. If I can see it, I will escalate the issue to the Developers to solve.
If I cannot see it, I will deploy the site on an online accessible free test server, where you can access the site and see the site working, or reproduce the problem so we can fix it.

It may be, that the problem sources from a server issue, which then would become visible.

#909363

This package is 7.5 GB in size and despite several trials it interrupts the download constantly.

Can we (can you give me permission) update Toolset here?
lien caché

I will need the site without any other plugin active and Theme TwentySeventeen active.
Please as well enable WP Debug.

Thanks!

#909378

Right - I went and disabled all plugins, deleted your two, installed fresh versions of your two, changed the theme to default

Hit lien caché

But the errors are still there

toolset-bs-component-buttons.js:108 Uncaught TypeError: Cannot read property 'getButton' of undefined
at ToolsetCommon.BootstrapCssComponentsQuickTags.self.add_bootstrap_components_buttons (toolset-bs-component-buttons.js:108)
at toolset-bs-component-buttons.js:21
at d (toolset-event-manager.min.js:1)
at Object.j [as doAction] (toolset-event-manager.min.js:1)
at HTMLDivElement.<anonymous> (toolset-bs-component-events.js:213)
at Function.each (load-scripts.php:2)
at toolset-bs-component-events.js:209
at load-scripts.php:116

And this kills everything in the backend - deactivate types - error still there - deactivate views - error is gone - RE-activate types - error is still gone - RE-activate views - error is back

Conclusion - there is an issue in the views plugin

I will leave the install as it is for the next hour - but at 4PM UK time, I will be reverting back to the plugins being active again and rolling your plugins back to the previous versions

#909792

I searched in our forums for that error, and while it's not the exact same there are similar:
https://toolset.com/forums/topic/i-have-some-conflict-in-javascript-about-toolset-and-bootstrap-which-broke-admin/
https://toolset.com/es/forums/topic/error-al-editar-entradas-relacionado-con-toolset-bs-component-buttons-js/
https://toolset.com/forums/topic/autogenerate-form-not-working/

It's not been reported in any as a BUG in the final cases.
Let's see what causes this on your site.

Please can you ZIP up the wp-content Folder (I assume the rest of your install is vanilla WordPress) and the Database?
Then, you can send this to me in a ZIP Shared with Google Drive, were you share it with anyone who has the link to the file.

This should be enough to replicate it locally unless you made modifications to the rest of the core files, please send them along with the package (although usually unless the wp-config.php nothing is edited and I can just use a native WordPress to replace the missing files)

Please exclude the Uploads, and any large ZIP, from the wp-content, before you send it along.

Then I will be able to replicate the site and see if this is maybe a server issue or any other problem, eventually related to some exceptional settings or fields/types used.

Thank you for your continued patience and cooperation!

#911059

Thanks, I deployed the Site

By default without changing anything I see a row of errors.

Deprecated: Function create_function() is deprecated in .../plugins/disable-jpeg-compression/disable-jpeg-compression.php on line 13
Deprecated: Function create_function() is deprecated in .../plugins/disable-jpeg-compression/disable-jpeg-compression.php on line 14
Deprecated: Function create_function() is deprecated in .../plugins/fb-reviews-pro/fbrp.php on line 61
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; CDL_Seasonal_Widget has a deprecated constructor in .../plugins/seasonal-archives/seasonal-archives.php on line 357
Notice: The called constructor method for WP_Widget in CDL_Seasonal_Widget is deprecated since version 4.3.0! Use
__construct()
instead. in .../wp-includes/functions.php on line 3903
Warning: Use of undefined constant depth - assumed 'depth' (this will throw an Error in a future version of PHP) in
.../plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 14
Notice: Undefined index: supports in .../plugins/responsive-lightbox/includes/class-frontend.php on line 67
Notice: Slug '' does not exists in .../plugins/post-connector-premium/core/classes/class-post-link-manager.php on line 165

Those are not related to the issue here and neither to Toolset - I disabled the software that causes these errors.
I then logged in, activated Toolset Types 2.3.1 as it was available there and can add a post and see no errors - as expected.

Then I updated Types (replaced manually) to 3.0 and I can still add posts and see no errors, as expected.

This issue is due to one of the 94 Plugins that are installed and potentially active, or, the Theme, although, as my test shows, it should a Plugin.

What is to mention, I did logically re-create the wp-config.php when I deployed the site, which means all cache and customizations in there where not used in this test.
As well no other plugin has been used in the test due to the errors they produce.

But even activating all 94 plugins the error is not visible on my install.
There are several other (Hidden) Errors as shown above, and they probably are the cause of the issue since on your install they are hidden while locally I show them with debug.

But this problem is not in Toolset - Toolset seems to just react to a avalanche of other errors.

Please confirm, locally or on a test site, that the above is fact for you as well.
I made this test with the copy of the site I received from you, with the above outlined steps.

#911061

The error is a clash between the latest versions of Types and Views and a plugin - that is obvious

But it has been introduced by the latest versions of Types and Views - as evidenced by the previous versions of Types and Views working correctly

BTW not all 94 plugins are in use - if you enabled them all then there were highly likely to be issues - I have less than 50 in actual use

Would you disagree with this? Everything works fine with the old versions and all the other plugins - it fails with the new versions and the plugins - indications would be that the new versions have an issue with a plugin in the NEW versions only

This is an install that has worked fine for many months - one version increment, specifically of VIEWs has broken it

#911063

Beda - did you read this ...

Right - I went and disabled all plugins, deleted your two, installed fresh versions of your two, changed the theme to default

Hit lien caché

But the errors are still there

toolset-bs-component-buttons.js:108 Uncaught TypeError: Cannot read property 'getButton' of undefined
at ToolsetCommon.BootstrapCssComponentsQuickTags.self.add_bootstrap_components_buttons (toolset-bs-component-buttons.js:108)
at toolset-bs-component-buttons.js:21
at d (toolset-event-manager.min.js:1)
at Object.j [as doAction] (toolset-event-manager.min.js:1)
at HTMLDivElement.<anonymous> (toolset-bs-component-events.js:213)
at Function.each (load-scripts.php:2)
at toolset-bs-component-events.js:209
at load-scripts.php:116

And this kills everything in the backend - deactivate types - error still there - deactivate views - error is gone - RE-activate types - error is still gone - RE-activate views - error is back

Conclusion - there is an issue in the views plugin

I have already gone through, disabling all plugins - upgrading your two - ON MY INSTALL - the issue remains - the above proves there is an issue ON MY INSTALL with your VIEWS plugin - because when only VIEWS and TYPES are the ONLY plugins, the issue exists

#911073

No, I disagree with this, as I show previously, the JS error is not there, even if I activate all 94 plugins and update Toolset

Of course, I updated Toolset while the plugins where inactive, hence maybe the process to follow is to have all the plugins active, update, and then only see the error.

I did see that you mention you did that, but as you see, I did it several times now and the error is not visible with these steps.

I cannot replicate this issue, and it is a compatibility issue, so we need to know what causes this.
As said another test can be to update with no Toolset active to see if you can confirm that then it works, so the task left would be to re-test with each plugins active/not active.

And I did more than just disable Plugins, I fixed the wp-config.php to be a vanilla one again, and that means all cache and other customization is removed.
It may very well be that this happens only if we update Types while all other plugins are active.

We do try to solve issues with 3rd party Plugins but we need to know how, and with what software, to replicate this issue.

I tried locally again to update Types and Views keeping all those plugins active, and again this JS error does not appear.

So this must be even an issue on the server that conflicts with either a plugin or Toolset.

To test this we would need to try to set up a clean install of WordPress on your server, and then see there if that still happens
It may be a issue generically or specifically with the install.

We need to know what causes it (what you do to make it happen) on a clean install, we cannot detect the cause in a ling list of plugins.
If we know the plugin or server setting that is conflicting we can eventually adjust it, but it seems until now that this is an exception that does not happen on any install, so it must a very specific thing.

Maybe you can duplicate this site, to another site, where we can really make some tests and not need to worry about hiding the site?
I can as well setup a online test server for you, where you can deploy the site, and we can then see it working (or not).

This service is free but if we see that the issue is not replicable there with the copy of your site, it would then be out of support as due to the server.
Would you like to deploy your site to a duplicate of ours?

I can set this up with the same data you sent me already.

First although it's good to make sure that this is replicable for you on your own test servers if you have any.
Thank you

#911105

Credentials are the same as on the beta server - here is a test environment for you

lien caché

please do NOT disable HideMySite and allow the site public access

#911113

Thank you.

I registered and Updated Toolset.
I de-registered it again as I used my own account for this.
I see no JS error in the console, but I see the broken Post editor in the New Post Screen.

I can see the error is due to Views.

Please do this on that test install:
- remove EVERY customization from wp-config.php and set it up new.
- remove EVERY must use, cache, Drop Ins and what not.

The install must be like a clean install, then this problem will be resolved, I assume.
The issue is within the cache or other scripts, and later, by re-enabling them, we will find out what it is.

I bet it's the drop in, as that is not active locally, and I cannot test with Drop In plugins a this stage.

Please can you confirm that if you do not use customization and other plugins the issue is gone on this test site as well?

#911114

Beda - you asked for a test server so you could test things - I haven't got the time to do this - that is why I have given you your own environment as you asked for

Drop -in plugin removed

Please paste back in here what you want the config to be - this is it currently

<removed as requested>

BEDA - YOU REMOVED HIDEMYSITE AGAIN - PLEASE UNDERSTAND A SIMPLE REQUEST - DO NOT REMOVE OR DISABLE THAT PLUGIN - DO YOU UNDERSTAND - ARE YOU INCAPABLE OF FOLLOWING ONE SIMPLE REQUEST - IF YOU CANNOT FOLLOW THIS REQUEST PLEASE HAVE SOMEONE ELSE WORK ON IT

PLEASE NOW REGISTER A COMPLAINT - TO BE DEALT WITH BY YOUR MANAGER - I HAVE REPEATEDLY ASKED YOU NOT TO DISABLE HIDEMYSITE - YOU DO SO EVERYTIME - THIS IS NOW RIDICULOUS AND A MANAGER NEEDS TO BE AWARE OF YOUR STUPIDITY!

#911123

Our Support policy is relatively clear, we cannot assist server issues:
https://toolset.com/toolset-support-policy/

As well we do not spot what plugin conflicts in a sum of several, or debug thirds party apps.
I can as well not login to FTP (I do not have the login details and I will not edit FTP files on a server that is not mine).
Drop In Plugins do not belong to native WordPress Installs, but I cannot remove them either as this has to be done by the webmaster.

The native wp-config.php could be adapted from this example:
https://codex.wordpress.org/Editing_wp-config.php#Default_wp-config-sample.php

BEDA - YOU REMOVED HIDEMYSITE AGAIN - PLEASE UNDERSTAND A SIMPLE REQUEST - DO NOT REMOVE OR DISABLE THAT PLUGIN - DO YOU UNDERSTAND - ARE YOU INCAPABLE OF FOLLOWING ONE SIMPLE REQUEST - IF YOU CANNOT FOLLOW THIS REQUEST PLEASE HAVE SOMEONE ELSE WORK ON IT

OK, please read my request:
- I need either a test server (you set this up and granted me access, + that I shall go forward and do my tests)
- Or I set up a site for you, and you deploy the problematic site there.

I cannot debug this with several (does not matter what) other software on site.
It's already almost not possible to debug something like this online - in this case we need the possibility to test this, with the steps I already outlined several times - and which until now for 3 supporters solved the issue.
(We tested this internally as well)

PLEASE NOW REGISTER A COMPLAINT - TO BE DEALT WITH BY YOUR MANAGER - I HAVE REPEATEDLY ASKED YOU NOT TO DISABLE HIDEMYSITE - YOU DO SO EVERYTIME - THIS IS NOW RIDICULOUS AND A MANAGER NEEDS TO BE AWARE OF YOUR STUPIDITY!

OK, done.
Please refer to our debug processes, disclaimers and support policy - we have worked on a site declared as test site, and I clearly stated what is needed to debug and solve this.

I apologize if this was not clear, please feel free to revert this site to its proper state or delete it and refer back to us when we can debug the issue, or, as I offered, we can offer you an online server where we can look at this as well.

Thank you!

#911125

BTW; if this problem has to be solved, we need to proceed with certain steps and guide lines which have been outlined and offered several times here.

Without them, it is in terms of possibility not possible to solve a problem

Can I offer again to set up a site on our servers where you can deploy this site so we are free to debug the issue and solve it?

#911126

Beda - read this very carefully - I have complied so far with your requests

Can we have a test server - I have given you one - test.natureslens.co.uk - that is your playground - you can do what you like with it - with one proviso - DO NOT DISABLE HIDEMYSITE - this is for commercial reasons

As I explained to Nigel earlier - you can disable it, test, then re-enable - but do not leave it exposed for long periods of time

I have one simple request - you are too commercially unaware to follow it - I would like another team member to take over this ticket

#911127

No - you asked for a test site I have given you a test site - you asked for it on the same server - it is on the same server - I asked you not to leave the site open to the public - you acted like a fool and did so

I want another team member, who can follow a simple request to take over this ticket please

And I want to hear from your manager as to why you failed to follow one very simple request