Skip to content
New issue

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

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

Already on GitHub? # to your account

HTTPHeaders error on PHP8 Upgrade #39862

Closed
sergiurat opened this issue Feb 14, 2023 · 5 comments
Closed

HTTPHeaders error on PHP8 Upgrade #39862

sergiurat opened this issue Feb 14, 2023 · 5 comments

Comments

@sergiurat
Copy link

Steps to reproduce the issue

Joomla 4, PHP7.4, HTTPHeaders - CSP - Script Hashes: Enabled.

Upgrade to PHP8.0, cannot open any Article, I get error:
An error has occurred.
0 hash(): Argument #2 ($data) must be of type string, array given

Go to HTTPHeaders - CSP - Script Hashes Disabled ----No Error, can access all Articles.

Expected result

Actual result

System information (as much as possible)

=============
System Information

php: Linux
dbserver: mysql
dbversion: 10.3.37-MariaDB-cll-lve
dbcollation: latin1_swedish_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: false
phpversion: 8.0.27
server: LiteSpeed
sapi_name: litespeed
version: Joomla! 4.2.7 Stable [ Uaminifu ] 31-January-2023 15:00 GMT
useragent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Additional comments

There is no error on Front, just on Admin. Workaround is to Disable Script Hashes and make changes to the Articles, then Enable it back.
Returning to PHP7.4 works.

@joomdonation
Copy link
Contributor

Is this a plugin from Joomla core or it's a third party plugin? If it is a third party plugin, please report this issue to the developer and ask him to fix it. Seems the plugin is not compatible with PHP 8 yet.

@ReLater
Copy link
Contributor

ReLater commented Feb 15, 2023

There are 2.

  • Core plugin: System – HTTP Header
  • Predecessor, 3rd party, from Joomla 3: System - HTTPHeaders
  • Same author. Nearly same features.

Use the first one. Disable/Uninstall the second one.

@sergiurat
Copy link
Author

Thank you for the information. It was installed two times, one instance from Joomla 3 and another one during upgrade to Joomla 4. I just disabled the old one.

@richard67
Copy link
Member

Thank you for the information. It was installed two times, one instance from Joomla 3 and another one during upgrade to Joomla 4. I just disabled the old one.

@sergiurat And has that solved your issue? If so, please report back so we can close this issue, or close it yourself on GitHub. Thanks in advance.

@joomdonation
Copy link
Contributor

OK. So I'm closing this issue because it's a none core issue. It is just error comes from third party extension and now solved.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

5 participants