Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging error in FSE themes #140

Closed
5 tasks done
HardeepAsrani opened this issue Aug 14, 2024 · 0 comments
Closed
5 tasks done

Debugging error in FSE themes #140

HardeepAsrani opened this issue Aug 14, 2024 · 0 comments
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product.

Comments

@HardeepAsrani
Copy link
Member

HardeepAsrani commented Aug 14, 2024

Description

Source: https://github.com/Codeinwp/neve-fse/blob/main/inc/Admin.php#L99

This line seems to cause a debugging error in all of our FSE themes:

[14-Aug-2024 19:26:31 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/themes/neve-fse/inc/Admin.php:99) in /var/www/html/wp-admin/admin-header.php on line 9

We shouldn't print content in an enqueue method as it sends it out in the header. We can use other options, such as adding it to the footer of the page or adding it via JS, but not echo in the header.

Step-by-step reproduction instructions

  1. Install Neve FSE
  2. Make sure debug logging is enabled.
  3. Open the editor and you should see the error.

Screenshots, screen recording, code snippet or Help Scout ticket

No response

Environment info

No response

Is the issue you are reporting a regression

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product.
Projects
None yet
Development

No branches or pull requests

1 participant