administrator/index.php?option=com_fabrik&view=elements not loading

Status
Not open for further replies.

zzzz54

Member
Hi guys, I have a problem, when I try to load the elements list in the backend the server says 404 not found.

I`ve thinking that could be related to the CPU or RAM of the hosting, because sometimes the page loads without issues, but since 7 days ago, the page its not working at all.

administrator/index.php?option=com_fabrik&view=elements not loading
 
Hi Hugh, thanks for your attention. I think that maybe something is wrong in some elements or perhaps I?ve hit the limit of elements that could be interpreted by the web browser. There?s more than 5000 elements and the fabrik_elements table (in phpmyadmin) shows a size of 10.4 MB

Currently I?m using phpmyadmin to find the element id and then paste at the end of the folloowing url

administrator/index.php?option=com_fabrik&view=element&layout=edit&id=

In this way I can edit the elements (a little pain included), but is not posible setup the order of each element for the list, form and details view. I need to re-order some elements, can you tell me if exists some workaround to do that?

best regards!
 
Last edited:
Have you tired increasing PHP's memory limit? Although I don't think the number of elements would have any effect on building the elements page, as the queries we build that from use standard limits, so the results set is never going to be more than your pagination display limit, unless you've somehow gotten stuck with "display all", although that's in the session data and should get reset when you logout and back in.

Ordering could be changed by hand by editing the #_fabrik_elements table by hand and modifying the 'ordering' field, but really ... you need to figure out what's going on, and fix the root cause.

Just FYI, I have clients with waaaay more than 5,000 elements.

Just out of interest, have you checked your "trashed" elements recently?

-- hugh
 
Thanks for the help. You are right, I really need to figure out what's going on. I?ve just incremented the memory_limit = 2048M and extend the max_execution_time = 7200 in the php5.ini file.

I?ve also checked the pagination and clear the cache for admin and frontend.

Until the last week the page was loading some times at the first attemp, but some times need two or three attemps.

?How can I access to the trashed elements? this could be the solution for me: filter via url perhaps (please forgive me if this question is so basic, but I haven?t found information about how to filter the lists of fabrik in the backend)
 
"Trashed" is not really a Fabrik thing, it's a J! thing. On the back end when you have "lists of things" which you can trash, typically they don't get immediately deleted, they stay in a "trashed" state until you specifically empty the trash. Where that is applicable, you'll get a "Select status" filter that lets you see your trashed items, which you can then "Empty trash" on.

NOTE - be VERY careful when emptying Fabrik's trash when it asks you what you want to delete. For instance, when deleting trashed element, we will ask if you also want to drop the underlying database table column. If the element you are trashing was a "child" and there are other elements still using that column, don't do it!

Of course, as you can't display the page, you can't do any of this.

2048M is excessive. I've never found anything in Fabrik which needs more than 128M.

So it sounds like something may have gotten messed up in your metadata.

My best suggestion is try this. Edit ./administrator/components/com_fabrik/models/elements.php, around line 144 you'll find this:

Code:
        // Work out the element ids so we can limit the fullname subquery
        $db->setQuery($query, $start = $this->getState('list.start'), $this->getState('list.limit'));
        $elementIds = $db->loadColumn();

Dump out the actual query like this:

Code:
        // Work out the element ids so we can limit the fullname subquery
        $db->setQuery($query, $start = $this->getState('list.start'), $this->getState('list.limit'));
var_dump((string)$query);exit;
        $elementIds = $db->loadColumn();

... and try and load the elements page again. It should dump out some SQL that looks like this:

Code:
string(448) " SELECT e.*, e.ordering AS ordering,(SELECT COUNT(*) FROM #__fabrik_jsactions AS js WHERE js.element_id = e.id) AS numJs,e.id FROM #__{package}_elements AS e LEFT JOIN #__users AS u ON checked_out = u.id LEFT JOIN #__{package}_groups AS g ON e.group_id = g.id LEFT JOIN #__{package}_formgroup AS fg ON fg.group_id = e.group_id LEFT JOIN #__{package}_lists AS l ON l.form_id = fg.form_id WHERE (e.published IN (0, 1)) ORDER BY ordering LIMIT 0, 20"

Try running that SQL by hand in phpMyAdmin (you'll have to replace #__ with your J! table prefix) and see how many rows it returns. It should be 20 (or whatever your pagination display limit is/was set to).

Assuming that returns the correct number of rows, move that var_dump() line down to around 174, just before the end of the function where we "return $query" (so before that return line).

That again should only return 20 rows.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top