Support

Akeeba Ticket System

#37897 Notice: TicketTable::$text has no effect

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.2.3
PHP version
7.4.27
Akeeba Ticket System version
5.1.1 (free)

Latest post by nicholas on Monday, 17 October 2022 04:26 CDT

b2z

Error report is set to maximum.

There are bunch of notices:

Notice: Indirect modification of overloaded property Akeeba\Component\ATS\Administrator\Table\TicketTable::$text has no effect in /var/www/domain.com/plugins/content/emailcloak/emailcloak.php on line 54

It appears when there is a private ticket. The category has text and text-area fields with Joomla plugin filter. But there is no e-mail in fields.

When I change ticket to public, this notice disappears.

nicholas
Akeeba Staff
Manager

This comes from Joomla's email cloak content plugin, not our code. See the path to the file in the error message: plugins/content/emailcloak/emailcloak.php

Open this file and you will see it's part of Joomla, namely https://github.com/joomla/joomla-cms/blob/4.2-dev/plugins/content/emailcloak/emailcloak.php

The core plugin is badly written. It assumes there is a property called text in all content objects, regardless of which extension they belong to, and it tries to cloak any emails in them. Since this is triggered onContentPrepared it executes literally everywhere. It doesn't matter if you have an article, Joomla contact object, a banner, a product in an e-commerce extension or a ticket in a helpdesk extension. It will stupidly try to do something with the very likely non-existent property text.

Since the ticket object is not a dumb stdClass object but a concrete object which implements a magic __get method, PHP complains that trying to pass it by reference (see line 86 of the plugin) will not have any effect which is a very correct warning.

The simple solution is that the Joomla email cloaking plugin should actually check there is something to do before trying to do it. Line 53 should read:

if (is_object($row) && property_exists($row, 'text')) {

You can report this bug to the Joomla project on Joomla's GitHub repository and at-mention me (@nikosdion) so I can provide the confirmation of the issue and the Pull Request to fix it. If I report it myself it's unlikely anyone will spend the 20 seconds it takes to look at the core code and go β€œoh, crap, it's been broken for 17 years!”.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

b2z

The issue has been posted.

https://github.com/joomla/joomla-cms/issues/38976

Thank you, Nick.

nicholas
Akeeba Staff
Manager

Thank you very much for creating the issue! I am tracking this issue now and we've got the production leadership engaged. We'll finally get to fix this :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!