Passer la navigation

[Closed] Undefined constant

This support ticket is created Il y a 7 months, 1 week. 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.

Ce sujet contient 1 reply, a 1 voix.

Dernière mise à jour par Christopher Amirian Il y a 7 months, 1 week.

Assisté par: Christopher Amirian.

Auteur
Publications
#2831134

Hi,

We have couple of sites getting an error for an undefined constant:
Fatal error: Uncaught Error: Undefined constant "WPCF_EMBEDDED_RES_RELPATH" in /public_html/wp-content/plugins/types/vendor/toolset/types/admin.php:95

Stack Trace
1.
wpcf_admin_init_hook()
/public_html/wp-includes/class-wp-hook.php:324
2.
WP_Hook->apply_filters()
/public_html/wp-includes/class-wp-hook.php:348
3.
WP_Hook->do_action()
/public_html/wp-includes/plugin.php:517
#3 lien caché) : eval()'d code(172): do_action()
5.
eval()
lien caché
6.
WP_CLI\Context\Admin->load_admin_environment()
lien caché
7.
WP_CLI\Context\Admin->WP_CLI\Context\{closure}()
/public_html/wp-includes/class-wp-hook.php:322
8.
WP_Hook->apply_filters()
/public_html/wp-includes/class-wp-hook.php:348
9.
WP_Hook->do_action()
/public_html/wp-includes/plugin.php:517
10.
do_action()
/public_html/wp-settings.php:727
11.
require('...')
lien caché
12.
WP_CLI\Runner->load_wordpress()
lien caché
13.
WP_CLI\Runner->start()
lien caché
14.
WP_CLI\Bootstrap\LaunchRunner->process()
lien caché
15.
WP_CLI\bootstrap()
lien caché
16.
include('...')
lien caché
17.
include('...')
/usr/local/bin/wp:4
18.
{main}

#2831152

Christopher Amirian
Supporter

Les langues: Anglais (English )

Hi,

Welcome to Toolset support. Would you please do as follows?

Create a full backup.

In WP Admin, deactivate all Toolset plugins (Types, Blocks, Forms, Maps, Access).

Delete the entire /wp-content/plugins/types/ folder via SFTP/hosting file manager (don’t just “Update”).

Upload a fresh copy of Types (same version as the rest of your Toolset plugins). Re-activate Types, then the others.

Clear opcode/page caches (PHP-FPM/opcache, any object cache, page cache).

Toolset → Settings → Front-end content → Clear cache.

If the issue persists, please check if the issue happens on a minimal installation:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except:
. Toolset types
. Toolser Blocks
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

Thanks.

The topic ‘[Closed] Undefined constant’ is closed to new replies.