PHP 8.0 breaks tag urls in Joomla 3.10.11 Topic is solved

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
bomblord
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Dec 01, 2022 6:11 pm

PHP 8.0 breaks tag urls in Joomla 3.10.11

Post by bomblord » Thu Dec 01, 2022 6:34 pm

After updating to PHP 8.0 today in order to stay at the minimum PHP version for security updates all of my pages that populate tags are broken with a 404 error. I've spent about 4 hours attempting to fix it and at this point I've come up with absolutely no solutions other than downgrading to PHP 7.X (which does work but is not a real solution due to security risks). With no other avenues to explore I am hoping the forum can steer me in the right direction.

The only non-standard component I have installed is my template (but I tried using protostar as at troubleshooting step but that did not fix it), Akeeba backup, and a custom plug-in needed to display specialized carousels developed by a third party we are partnered with (it doesn't affect tags or urls).

From what I gathered I believe the issue lies somewhere in how the URL is being handled

Joomla generates a URL for tagged items in this format

Code: Select all

index.php?option=com_tags&view=tag&id[0]=50
Which if I use the protostar template (which I did as a troubleshooting step) it gives me this error

Code: Select all

urlencode(): Argument #1 ($string) must be of type string, array given 
So far I have tried

- Googling the error in various formats and applying anything that looked like a fix (and undoing anything that didn't work)

- Manually typing in the URL and removing the $id[0]=50 and replacing it with $id=50 which makes the page partially populate but it's still broken and only populating a series of broken unformatted images with links to the actual items.

- Inspected the tag.php file as similar issue was found in Joomla 3.10.8 but the recommended changes did not resolve my issue and were reverted. The topic also claimed it was fixed in an update that I have already applied.

- Overwriting the Joomla files via the update tool but was also to no avail.

- Enabled PHP debugging on my hosting provider and checked the error logs (there was nothing relevant only a reference to xmless being forbidden).

Updating to Joomla 4 is a long-term project as when I used a staging site to test the update it broke the site severely.

Edit:
FPA
Forum Post Assistant (v1.6.5) : 1-Dec-2022 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 3.10.11-Stable (Daraja) 14-August-2022
Joomla! Platform :: Joomla Platform 13.1.0-Stable (Curiosity) 24-Apr-2013
Joomla! Configured :: Yes | Read-Only (444) |
Configuration Options :: Offline: false | SEF: true | SEF Suffix: false | SEF ReWrite: true | .htaccess/web.config: Yes | GZip: true | Cache: false | CacheTime: 15 | CacheHandler: file | CachePlatformPrefix: false | FTP Layer: false | Proxy: false | LiveSite: Is Not Empty | Session lifetime: 15 | Session handler: database | Shared sessions: false | SSL: 2 | Error Reporting: default | Site Debug: false | Language Debug: false | Default Access: Public | Unicode Slugs: false | dbConnection Type: mysqli | PHP Supports J! 3.10.11: Yes | Database Supports J! 3.10.11: Yes | Database Credentials Present: Yes |

Host Configuration :: OS: Linux | OS Version: 4.14.117-grsec-grsec+ | Technology: x86_64 | Web Server: Apache | Encoding: gzip, deflate, br | System TMP Writable: Yes | Free Disk Space : 300.77 GiB |

PHP Configuration :: Version: 8.0.22 | PHP API: cgi-fcgi | Session Path Writable: Yes | Display Errors: 0 | Error Reporting: 22519 | Log Errors To: | Last Known Error: | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: | Uploads: 1 | Max. Upload Size: 512M | Max. POST Size: 10M | Max. Input Time: -1 | Max. Execution Time: 120 | Memory Limit: 128M

Database Configuration :: Version: 8.0.28-0ubuntu0.20.04.3 (Client:mysqlnd 8.0.22) | Database Size: 51.29 MiB | #of Tables with config prefix:  84 | #of other Tables:  138 | User Privileges : GRANT SELECTUser Privileges : INSERTUser Privileges : UPDATEUser Privileges : DELETEUser Privileges : CREATEUser Privileges : DROPUser Privileges : REFERENCESUser Privileges : INDEXUser Privileges : ALTERUser Privileges : CREATE TEMPORARY TABLESUser Privileges : LOCK TABLESUser Privileges : EXECUTEUser Privileges : CREATE VIEWUser Privileges : SHOW VIEWUser Privileges : CREATE ROUTINEUser Privileges : ALTER ROUTINEUser Privileges : TRIGGER
Detailed Environment :: wrote:PHP Extensions :: Core (8.0.22) | date (8.0.22) | libxml (8.0.22) | pcre (8.0.22) | sqlite3 (8.0.22) | filter (8.0.22) | hash (8.0.22) | intl (8.0.22) | json (8.0.22) | mbstring (8.0.22) | SPL (8.0.22) | PDO (8.0.22) | Reflection (8.0.22) | session (8.0.22) | pdo_sqlite (8.0.22) | standard (8.0.22) | mysqlnd (mysqlnd 8.0.22) | cgi-fcgi (8.0.22) | bcmath (8.0.22) | bz2 (8.0.22) | calendar (8.0.22) | ctype (8.0.22) | curl (8.0.22) | dom (20031129) | exif (8.0.22) | fileinfo (8.0.22) | ftp (8.0.22) | gd (8.0.22) | gettext (8.0.22) | iconv (8.0.22) | imap (8.0.22) | mysqli (8.0.22) | openssl (8.0.22) | pcntl (8.0.22) | pdo_mysql (8.0.22) | zlib (8.0.22) | posix (8.0.22) | pspell (8.0.22) | sodium (8.0.22) | SimpleXML (8.0.22) | soap (8.0.22) | sockets (8.0.22) | tokenizer (8.0.22) | xml (8.0.22) | xmlreader (8.0.22) | xmlwriter (8.0.22) | xsl (8.0.22) | zip (1.19.5) | Phar (8.0.22) | imagick (3.5.0) | Zend OPcache (8.0.22) | Zend Engine (4.0.22) |
Potential Missing Extensions ::

Switch User Environment :: PHP CGI: Yes | Server SU: Yes | PHP SU: Yes | Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (755) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) | administrator/logs/ (---) |

Elevated Permissions (First 10) ::
Database Information :: wrote:Database statistics :: Uptime: 9845923 | Threads: 28 | Questions: 8515887029 | Slow queries: 443172835 | Opens: 930358483 | Flush tables: 3 | Open tables: 2048 | Queries per second avg: 864.915 |
Extensions Discovered :: wrote:Components :: Site ::
Core :: com_mailto (3.0.0) 1 | com_wrapper (3.0.0) 1 |
3rd Party::

Components :: Admin ::
Core :: com_admin (3.0.0) 1 | com_ajax (3.2.0) 1 | com_banners (3.0.0) 1 | com_cache (3.0.0) 1 | com_categories (3.0.0) 1 | com_checkin (3.0.0) 1 | com_config (3.0.0) 1 | com_content (3.0.0) 1 | com_contenthistory (3.2.0) 1 | com_cpanel (3.0.0) 1 | com_finder (3.0.0) 1 | com_installer (3.0.0) 1 | com_joomlaupdate (3.10.1) 1 | com_languages (3.0.0) 1 | com_login (3.0.0) 1 | com_media (3.0.0) 1 | com_menus (3.0.0) 1 | com_messages (3.0.0) 1 | com_modules (3.0.0) 1 | com_newsfeeds (3.0.0) 1 | com_plugins (3.0.0) 1 | com_postinstall (3.2.0) 1 | com_redirect (3.0.0) 1 | com_search (3.0.0) 1 | com_tags (3.1.0) 1 | com_templates (3.0.0) 1 | com_users (3.0.0) 1 | com_associations (3.7.0) 1 | com_fields (3.7.0) 1 | com_actionlogs (3.9.0) 1 | com_privacy (3.9.0) 1 |
3rd Party:: com_wise (3.6.4) 1 | Akeeba (8.2.2) 1 |

Modules :: Site ::
Core :: mod_articles_archive (3.0.0) 1 | mod_articles_categories (3.0.0) 1 | mod_articles_category (3.0.0) 1 | mod_articles_latest (3.0.0) 1 | mod_articles_news (3.0.0) 1 | mod_articles_popular (3.0.0) 1 | mod_banners (3.0.0) 1 | mod_breadcrumbs (3.0.0) 1 | mod_custom (3.0.0) 1 | mod_feed (3.0.0) 1 | mod_finder (3.0.0) 1 | mod_footer (3.0.0) 1 | mod_languages (3.5.0) 1 | mod_login (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_random_image (3.0.0) 1 | mod_related_items (3.0.0) 1 | mod_search (3.0.0) 1 | mod_stats (3.0.0) 1 | mod_syndicate (3.0.0) 1 | mod_tags_popular (3.1.0) 1 | mod_tags_similar (3.1.0) 1 | mod_users_latest (3.0.0) 1 | mod_whosonline (3.0.0) 1 | mod_wrapper (3.0.0) 1 |
3rd Party:: Blank Module (6.0.14) 1 | mod_wiseaanwinsten (3.6.4) 1 | mod_wisenewadditions (3.6.4) 1 | mod_wiseboekenlijst (3.6.4) 1 | mod_wisedigitalebron (3.6.4) 1 | mod_wisebookcarousel (3.6.4) 1 | mod_wisemyaccount (3.6.4) 1 | mod_wisesearchbar (3.6.4) 1 | mod_wisewrapper (3.6.4) 1 |

Modules :: Admin ::
Core :: mod_custom (3.0.0) 1 | mod_feed (3.0.0) 1 | mod_latest (3.0.0) 1 | mod_logged (3.0.0) 1 | mod_login (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_multilangstatus (3.0.0) 1 | mod_popular (3.0.0) 1 | mod_quickicon (3.0.0) 1 | mod_stats_admin (3.0.0) 1 | mod_status (3.0.0) 1 | mod_submenu (3.0.0) 1 | mod_title (3.0.0) 1 | mod_toolbar (3.0.0) 1 | mod_version (3.0.0) 1 | mod_sampledata (3.8.0) 1 | mod_privacy_dashboard (3.9.0) 1 | mod_latestactions (3.9.0) 1 |
3rd Party::

Libraries ::
Core ::
3rd Party:: Regular Labs Library (17.5.13702) 1 | file_fof40 (4.1.0) ? |

Plugins ::
Core :: plg_authentication_cookie (3.0.0) 1 | plg_authentication_gmail (3.0.0) 0 | plg_authentication_joomla (3.0.0) 1 | plg_authentication_ldap (3.0.0) 0 | plg_captcha_recaptcha (3.4.0) 0 | plg_captcha_recaptcha_invisible (3.8) 0 | plg_content_emailcloak (3.0.0) 0 | plg_content_finder (3.0.0) 0 | plg_content_joomla (3.0.0) 1 | plg_content_loadmodule (3.0.0) 1 | plg_content_pagebreak (3.0.0) 1 | plg_content_pagenavigation (3.0.0) 1 | plg_content_vote (3.0.0) 1 | plg_content_fields (3.7.0) 1 | plg_content_confirmconsent (3.9.0) 0 | plg_editors-xtd_article (3.0.0) 1 | plg_editors-xtd_image (3.0.0) 1 | plg_editors-xtd_pagebreak (3.0.0) 1 | plg_editors-xtd_readmore (3.0.0) 1 | plg_editors-xtd_module (3.5.0) 1 | plg_editors-xtd_fields (3.7.0) 1 | plg_editors-xtd_menu (3.7.0) 1 | plg_extension_joomla (3.0.0) 1 | plg_finder_categories (3.0.0) 1 | plg_finder_contacts (3.0.0) 1 | plg_finder_content (3.0.0) 1 | plg_finder_newsfeeds (3.0.0) 1 | plg_finder_tags (3.0.0) 1 | plg_quickicon_extensionupdate (3.0.0) 1 | plg_quickicon_joomlaupdate (3.0.0) 1 | plg_quickicon_phpversioncheck (3.7.0) 1 | plg_quickicon_privacycheck (3.9.0) 1 | plg_quickicon_eos310 (3.10.0) 1 | plg_search_categories (3.0.0) 1 | plg_search_contacts (3.0.0) 1 | plg_search_content (3.0.0) 1 | plg_search_newsfeeds (3.0.0) 1 | plg_search_tags (3.0.0) 1 | plg_system_cache (3.0.0) 0 | plg_system_debug (3.0.0) 1 | plg_system_highlight (3.0.0) 1 | plg_system_languagecode (3.0.0) 0 | plg_system_languagefilter (3.0.0) 0 | plg_system_log (3.0.0) 1 | plg_system_logout (3.0.0) 1 | plg_system_p3p (3.0.0) 0 | plg_system_redirect (3.0.0) 0 | plg_system_remember (3.0.0) 1 | plg_system_sef (3.0.0) 1 | plg_system_stats (3.5.0) 1 | plg_system_updatenotification (3.5.0) 1 | plg_system_fields (3.7.0) 1 | plg_system_sessiongc (3.8.6) 1 | plg_system_logrotation (3.9.0) 1 | plg_system_privacyconsent (3.9.0) 0 | PLG_SYSTEM_ACTIONLOGS (3.9.0) 0 | plg_twofactorauth_totp (3.2.0) 0 | plg_twofactorauth_yubikey (3.2.0) 0 | plg_user_contactcreator (3.0.0) 0 | plg_user_joomla (3.0.0) 1 | plg_user_profile (3.0.0) 0 | plg_user_terms (3.9.0) 0 | plg_installer_webinstaller (2.1.2) 1 | PLG_INSTALLER_FOLDERINSTALLER (3.6.0) 1 | plg_installer_packageinstaller (3.6.0) 1 | PLG_INSTALLER_URLINSTALLER (3.6.0) 1 | plg_fields_calendar (3.7.0) 1 | plg_fields_checkboxes (3.7.0) 1 | plg_fields_color (3.7.0) 1 | plg_fields_editor (3.7.0) 1 | plg_fields_imagelist (3.7.0) 1 | plg_fields_integer (3.7.0) 1 | plg_fields_list (3.7.0) 1 | plg_fields_media (3.7.0) 1 | plg_fields_radio (3.7.0) 1 | plg_fields_sql (3.7.0) 1 | plg_fields_text (3.7.0) 1 | plg_fields_textarea (3.7.0) 1 | plg_fields_url (3.7.0) 1 | plg_fields_user (3.7.0) 1 | plg_fields_usergrouplist (3.7.0) 1 | plg_fields_repeatable (3.9.0) 1 | plg_privacy_consents (3.9.0) 1 | plg_privacy_content (3.9.0) 1 | plg_privacy_message (3.9.0) 1 | plg_privacy_user (3.9.0) 1 | plg_privacy_actionlogs (3.9.0) 1 | PLG_ACTIONLOG_JOOMLA (3.9.0) 1 |
3rd Party:: plg_authentication_wise (3.6.4) 0 | plg_editors_codemirror (5.60.0) 1 | plg_editors_tinymce (4.5.12) 1 | plg_quickicon_akeebabackup (8.2.2) 1 | plg_system_regularlabs (17.5.13702) 1 | plg_system_wise (3.6.4) 1 | PLG_SYSTEM_BACKUPONUPDATE (8.2.2) 0 | PLG_ACTIONLOG_AKEEBABACKUP (8.2.2) 0 |
Templates Discovered :: wrote:Templates :: Site :: beez3 (3.1.0) 1 | frontend (1.0.0) 1 | OrdaSoft Template - Base Template (2.5.0) 1 | protostar (1.0) 1 | obits (2.5.0) 1 | fullscreen (2.5.0) 1 |
Templates :: Admin :: hathor (3.0.0) 1 | isis (1.0) 1 |
Last edited by imanickam on Fri Dec 02, 2022 4:49 pm, edited 2 times in total.
Reason: Moved topic » from Administration Joomla! 3.x to Extensions for Joomla! 3.x

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2901
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: PHP 8.0 breaks tag urls in Joomla 3.10.11

Post by SharkyKZ » Thu Dec 01, 2022 8:19 pm

Enable debug and post stack trace.

bomblord
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Dec 01, 2022 6:11 pm

Re: PHP 8.0 breaks tag urls in Joomla 3.10.11

Post by bomblord » Thu Dec 01, 2022 8:51 pm

SharkyKZ wrote:
Thu Dec 01, 2022 8:19 pm
Enable debug and post stack trace.
I turned error logging to debug but the page just says "error"
I also tried maximum but that just gave the same error I listed in my OP.

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: PHP 8.0 breaks tag urls in Joomla 3.10.11

Post by sozzled » Thu Dec 01, 2022 9:02 pm

Some ideas:

1) Change the line in configuration.php where it is written (around line 28 or thereabouts), from

Code: Select all

	public $live_site = 'something';
to

Code: Select all

	public $live_site = '';
2) In the file configuration.php (at about line 83 at a guess), change

Code: Select all

	public $session_handler = 'database';
to

Code: Select all

	public $session_handler = 'none';
3) Look for a file named error_log (in the root folder where you will find configuration.php); it’s a text file. Any errors there?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17431
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: PHP 8.0 breaks tag urls in Joomla 3.10.11

Post by toivo » Thu Dec 01, 2022 9:19 pm

bomblord wrote:
Thu Dec 01, 2022 6:34 pm
Joomla generates a URL for tagged items in this format

Code: Select all

index.php?option=com_tags&view=tag&id[0]=50
That format is odd because it should not have any square brackets at all.

Tag links look like this in Joomla 3.10.11, when Search Engine Friendly URLs are not configured:

Code: Select all

http://example.com/index.php?option=com_tags&view=tag&id=5:testing
Check if the html folder of your front end template contains a sub folder com_tags, which means that a template override changes the way tags are displayed.

If that does not help, suggest that third party plugins are disabled one at a time to identify the culprit.

As an aside, Joomla 3.10.11 presents tag links in several formats, depending on how SEF URLs have been configured in Global Configuration.

Both Search Engine Friendly URLs and URL rewriting configured:

Code: Select all

http://example.com/component/tags/tag/testing
Search Engine Friendly URLs configured without URL rewriting:

Code: Select all

http://example.com/index.php/component/tags/tag/testing
If there is a menu item of the type 'List All Tags' and the menu item is called 'All Tags', a tag link looks like this, assuming that Search Engine Friendly URLs and URL rewriting are configured:

Code: Select all

http://example.com/all-tags/testing
BTW, the following anomaly should be fixed by your host:
bomblord wrote:
Thu Dec 01, 2022 6:34 pm
Max. Upload Size: 512M | Max. POST Size: 10M
The POST Size value is normally larger than the Max. Upload Size. Recommended values for both are 32M or 64M.
Toivo Talikka, Global Moderator

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: PHP 8.0 breaks tag urls in Joomla 3.10.11

Post by sozzled » Thu Dec 01, 2022 9:46 pm

Good points, @toivo.

Using "unlimited" PHP values, e.g Max. Input Time = -1, is not a good idea. Unlimited/undefined time limits, like these, are known to cause problems with updating from one version of J! to another and problems with backup/restore. Define a reasonable value, say 60 seconds, instead of using "-1"; 60 seconds should be enough for most purposes. In addition to what you recommended about PHP, these are my suggestions for absolute minimum values in configuring PHP:

Image

bomblord
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Dec 01, 2022 6:11 pm

Re: PHP 8.0 breaks tag urls in Joomla 3.10.11

Post by bomblord » Fri Dec 02, 2022 3:06 pm

After another several hours of troubleshooting I found a component that's part of our 3rd party integration was causing the issue and somehow intercepting or modifying how URL's are handled (although the url's still show the brackets). I've disabled the component for now and emailed the developers.

bomblord
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Dec 01, 2022 6:11 pm

Re: PHP 8.0 breaks tag urls in Joomla 3.10.11

Post by bomblord » Fri Dec 02, 2022 6:30 pm

So it seems that something deeper is going on here.

For no discernible reason pages that populate tags now just reload the page when clicking on a link despite the links being clearly correct in the HTML. I can even right click and open in a new tab or copy it and ope it elsewhere and it will go to a different page but if I click it on the page it just reloads... This is with every non-standard module other than Akiba backup disabled.

Edit: Was able to fix it by removing a form from the com_tags php file.


Locked

Return to “Extensions for Joomla! 3.x”