Jump to content

Product Settings fails with Symfony error


withypitts

Recommended Posts

8.0.4

PARAMETERS  -->  Shop Parameters  --> Product Settings

RESULTS IN:

Attempted to call function "highlight_file" from namespace "Symfony\Component\ErrorHandler\ErrorRenderer".

No errors reported.  Hosting service can find no issues.  Prestashop support say not a ore issue.

I'm struggling to see where the problem is.

I've cleared caches.

All other menu items in PARAMETERS & Shop Parameters work fine.

 

Screenshot_20251027_Symfony_error.png

Link to comment
Share on other sites

Thank you, we are planning to upgrade but are aware that this is not necessarily easy.

Update: We’ve reviewed the PHP error logs and found that the issue is related to the Smarty template engine used by your PrestaShop website. The error message:

indicates that part of the template system is trying to access a property that doesn’t exist. This typically occurs due to a compatibility issue between the Smarty and Symfony libraries, or when the site is running on a newer PHP version that these components were not fully designed for.

 

Link to comment
Share on other sites

3 hours ago, withypitts said:

Thank you, we are planning to upgrade but are aware that this is not necessarily easy.

Update: We’ve reviewed the PHP error logs and found that the issue is related to the Smarty template engine used by your PrestaShop website. The error message:

indicates that part of the template system is trying to access a property that doesn’t exist. This typically occurs due to a compatibility issue between the Smarty and Symfony libraries, or when the site is running on a newer PHP version that these components were not fully designed for.

 

rather than preach and perfectly understand, admin should not upgrade unless they talk to ps adult jajajaja

let's try this wild guess, and here we go!

The error “Attempted to call function highlight_file …” is only because the host disabled that PHP function. Re-enable it and reload — you will then see the real Symfony error. The real error is:
“Expected argument of type object, array or empty, string given”
which usually means a module added something wrong to Shop → Parameters → Product Settings. Disable the extra module(s) that extend that page, reload, and it should open. Then re-enable one by one to find the culprit.

To find the real cause
On 8.0.4 the Product Settings page is a Symfony form that other modules can extend. The classic causes:

  • A module that tries to add a field and returns string instead of array in its form subscriber.
  • A module that stored invalid JSON/array in configuration and now the form can’t hydrate it.
  • A value in ps_configuration that should be array but is now string.

Quick checks:

Temporarily disable 3rd-party/back-office form modules (stock, feeds, product extras) and try the page again.

Turn on debug and check /var/logs or var/logs/dev.log once highlight_file is enabled — it will tell you exactly which field is failing.

If you recently installed/updated a module just before this started, that’s suspect #1.

 

If you can grab the first stack trace after enabling highlight_file, paste it and I can tell you exactly which module/field it is.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...