update_col list plugin and PHP8

BasilC

Member
When I try to use the update_col list plugin using PHP8 I get an error message " 0 Attempt to modify property "coltoupdate" on null". I've tried with various columns and values but always get the same result. The plugin worked well on PHP7.4 (and has proved very useful!)
 
Fabrik is not PHP 8 compatible, and never claimed to be. However, many kinks have been ironed out, so much is actually working with PHP 8, but not everything. The "Update Columns" list plugin hasn't been touched in a long time, and will likely not be in the foreseeable future... unless someone familiar with the subject and in need of it fixes it, or a paying client needs both the plugin and PHP 8.

So, at least for the time being, running PHP 7 is your best option, indeed.
 
Thanks, but PHP7 will no longer be supported after, I think, November, and even if I keep using it, it will probably prevent me from installing new versions to Admin Tools and Akeeba Backup, which are vital components.

I realise that Fabrik is formally not PHP8-ready, but fixes to several PHP8 issues have appeared via Github over the past few months. As far as I can see, the Update Columns plugin is the only Fabrik plugin that I use that won't work with PHP8.

I find it very useful, but if push comes to shove I can use phpMySql to update the database or update records individually - both are very tedious options compared with the Update Columns.

I wouldn't have a clue how to update the plugin myself and the website I use it on is a community website that is paid for 100% out of my own pocket and costs me enough as it is.
 
I wouldn't expect anyone to touch anything in Fabrik 3.10 outside the core anymore unless it's custom work. For obvious reasons, not even closely related to PHP 8 vs 7, but rather to such as Joomla 4 vs 3. But that's another subject (off-topic in your thread here) which you'll find info on when browsing the forum, e.g. here.
 
I can't replicate.
Are you running a recent GitHub update?
If no: update
If yes:
Enable Joomla's System Debug to get the error stack and post it here.
 
I updated my development website from Github but it's made no difference (in any case, it's not long since I did a GitHub update).

I also installed and tested the Column Update plugin on another, much more straightforward, list, and the same error occurs there.

Error stack below:

An error has occurred.
0 Attempt to modify property "coltoupdate" on null
/customers/X/X/f/XXX.uk/httpd.www/plugins/fabrik_list/update_col/update_col.php:210
Call stack
#
Function Location
1 () JROOT/plugins/fabrik_list/update_col/update_col.php:210
2 PlgFabrik_ListUpdate_col->getUpdateCols() JROOT/plugins/fabrik_list/update_col/update_col.php:244
3 PlgFabrik_ListUpdate_col->process() JROOT/components/com_fabrik/models/pluginmanager.php:676
4 FabrikFEModelPluginmanager->runPlugins() JROOT/components/com_fabrik/models/list.php:569
5 FabrikFEModelList->processPlugin() JROOT/administrator/components/com_fabrik/controllers/list.php:325
6 FabrikAdminControllerList->doPlugin() JROOT/libraries/src/MVC/Controller/BaseController.php:702
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_fabrik/fabrik.php:87
8 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
9 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
10 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
11 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
12 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
13 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51
 
As I said, I can't replicate .
What is your exact php version, Joomla version?

Your exact update_col settings?

Any list filter settings on your elements? (The udate_col code is somehow related to list filters)
 
J3.10.11
PHP 8.0.22

(An old copy of the website running on XAMPP shows exactly the same behaviour: PHP8.0.15, J3.10.6)

Several elements have filters - I haven't bothered listing them because a test list I created today with just the two default fields plus two absolutely vanilla text fields with just default settings shows the same error)
 
I forgot to send the Update Column settings.

Access: Administrator (but changing to public makes no difference) (Fabrik is only used in the back end - the only use in the front end is for Search)

Settings: Allow user selection: Yes
Check can edit? No

otherwise default settings
 
The website won't run in PHP8.1.9 - I get this in both front end and back end

Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /customers/XXXX/httpd.www/libraries/vendor/joomla/input/src/Input.php on line 41 Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /customers/XXXX/httpd.www/libraries/vendor/joomla/input/src/Input.php on line 170 Deprecated: Joomla\CMS\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /customers/XXXX/httpd.www/libraries/src/Input/Input.php on line 31 Warning: session_name(): Session name cannot be changed after headers have already been sent in /customers/XXXX/httpd.www/libraries/joomla/session/handler/native.php on line 128 Deprecated: Joomla\CMS\Input\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /customers/XXXX/httpd.www/libraries/src/Input/Cookie.php on line 0 Warning: session_cache_limiter(): Session cache limiter cannot be changed after headers have already been sent in /customers/XXXX/httpd.www/libraries/joomla/session/handler/native.php on line 235 Error: Failed to start application: Failed to start the session because headers have already been sent by "/customers/XXXX/httpd.www/libraries/vendor/joomla/input/src/Input.php" at line 41.
 
I assume that Joomla should run on PHP8.1 or you wouldn't have suggested it. Is it likely to be an outdated extension that's causing that error? I can install 8.1 on XAMPP and try disabling suspicious extensions in the database. Perhaps starting with the front-end template, Business Pro, which is well past its sell-by date?
 
I have a test installation J!3.10.11, Protostar, Fabrik3 GitHub, Akeeba, php8.1.6
Update_col is working there.

Deprecated messages are only notices which can be ignored. But if displayed they'll break any Fabrik ajaxfied stuff because of mixing up the expected JSON response.
 
@BasilC : Try the following.
In plugin settings ->tab-update->update select a column and a value. This will be the 'preset'.
I think the 'preset' must be set. If not the parameter 'update_col_updates' will be NULL, causing this issue in PHP8.
Since you set 'Allow user selection' = yes, the preset will not be used.
 
Many thanks both. And apologies for my slowness in seeing your updates as I was busy with other things. This has done the trick. I know you're both working on Fabrik for J4, so I hope this is one of the plugins that you'll be including!

PHP8 is very unforgiving! I just spent a long time trying to find an error in some of my own code that was stopping an important page working in PHP8. Just the theoretical possibility that there might be a null value for $newsletter_image meant that
getimagesize($newsletter_image) was throwing an error. Worked fine in PHP7.4.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top