Deleting record from list; Loading… spinner does not clear; no page refresh

Status
Not open for further replies.
I have a list based on a view and use the php_events onDeleteRows method to perform the required database update, returning false (to prevent any attempt to delete from the view). When the record’s delete icon is clicked, a Loading… spinner appears and remains indefinitely - until the page is refreshed manually. The refreshed page shows that all the required actions took place. If I remove the function call from onDeleteRows and replace it with a simple return(false) the effect is the same with a permanent spinner (and the record of course remains). In the Fabrik3 site I am updating from it works properly; when delete is clicked, a spinner appears very briefly and the page refreshes.

Fabrik4 Gamma1, Joomla 4.2.8, PHP 8.1.16.
 
Are there JS errors in your browser console?
Is your list ajaxfied?
Do you have any debug output (J! System debug on, J! error reporting on...). Keep in mind that any debug output will break the expected JSON response and so the list display update.
 
The answers to your questions are yes, no and yes.

Thanks for pointing me in the right direction; I was a bit tired when working on this and, as the problem was in PHP, did not think to look at the JS console. The error message there was:
Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /var/www/vhosts/victilia.com/scmoldev.victilia.com/components/com_fabrik/models/list.php on line 5884
(several times).
I had a look at the code and changed components/com_fabrik/models/list.php 5884 to:

$obj = json_decode((string)$this->_db->loadResult());

That fixed the problem.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top