(SOLVED) From Detail View shows a "1"

I'm able to reproduce it (latest Joomla, latest GitHub).

Joomla caching on
List caching not disabled (default)
Any details view loaded from Joomla cache has the "1" appended.
("1" is gone if caching (Joomla or list) is off or after Joomla's Clear cache com_fabrik).
 
Whaaaat?! I thought I had ruled out caching as being part of the culprit. Well, with JCH Optimize, Joomla cache and server-side static cache I might have gotten confused and overlooked something.

@troester: Glad you found out, that being the reason that I "like" your post -- not so much the content, haha.

It seemingly not being an issue with native J! and other components, not even Fabrik lists or forms but only details, it would sure be nice if someone could dig deeper for where that 1 is really coming from.
Still scratching my head why not more folks here stumbled over it, but I guess not many are using J! caching, and those who do don't reload their detail pages often, and if, they might be focusing on something else.

I've been investigating workarounds for until we have a final fix at the source:

Turning caching off? On the site I was referring to I need all the caching, otherwise the server gets too quickly too stressed. So, that's a no-no for me in that specific case.

JS: Been trying some scripts to empty/remove the component container but not the child nodes. But couldn't get anything to work, not even with contents(), filter function and nodeType tricks.

Leaves only CSS? This works for me, but may not work for everyone:
Code:
#tm-content {
    font-size:0;
    line-height:0;
}
#tm-content > * {
    font-size:1rem;
    line-height:24px;
}
Of course, #tm-content is my component container in which that stray 1 is sitting, and 24px is my default line-height, so you'll need to replace those with whatever yours are.

Thanks again @troester for spending so much time on this!
 
If you need to get rid of the "1" for only some "exposed" detail views (e.g. on the start page) you can set "Disable caching"=yes per list (Details/Advanced)
 
Thanks again and, yeah, that might be an option for some other sites and some lists (actually, I've been already using it on lists only accessible for admins and for different reasons), but the details I've been linking to earlier are, like all publicly accessible details there, from the list where caching is crucial. Again, turning caching off in this case is a no-no, unfortunately.

Anyhow, we're talking workarounds. Bet you agree that eliminating the problem at the source should be the goal. ;)
 
Hi @lousyfool i actually just need to show 2 elements a Picture and a Field, and not allow edition, so that is why i try Detail template first. but i end up making a From template for that and work it out! but is it some bug out there... in the MATRIX LOL
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top