Pending
Referenced as Duplicate of: # 512

User tests: Successful: Unsuccessful:

avatar jmcameron
jmcameron
19 Oct 2012

This loop is for displaying articles in a category -- for a category blog page, for instance. If the context for the contentPrepare callback isn't set to com_content.article, there is no way for the contentPrepare() plugin callback to distinguish the category description from the articles below it. This fix is necessary to allow extension code to handle contentPrepare() callbacks correctly for category blog pages.

Bug:http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29534

avatar jmcameron jmcameron - open - 19 Oct 2012
avatar mahagr
mahagr - comment - 19 Oct 2012

Looks good to me.

avatar elinw
elinw - comment - 29 Nov 2012

@mahagr if you tested it could you please put a note in the issue tracker?

avatar mahagr
mahagr - comment - 30 Nov 2012

I haven't fully tested it and I think that there might be side effects in the existing plug-ins because of the change (both good and bad).

But I do agree that when the content comes from the article, also the context should be set to article to be able to pick up the right filters.

That said: what if you need to know that the content is an article introtext inside the category view (vs full article or category description)?

avatar jmcameron
jmcameron - comment - 30 Nov 2012

Although it may be remotely possible that other plugins might be affected, I think it is unlikely for the following reasons:

  1. This fix only affects category displays. Standard frontpage, featured, article views, etc, will not be affected.

  2. Since there is currently no way to distinguish between the callbacks for category description and for the articles in the category, the best that current plugins can do is to treat them all the same. So they must actually be ignoring the $context anyway. So I think the proposed fix will not affect any current plugins out there. By the way, the only logical way this can be done currently is to count the callbacks (first is the category description, the rest are articles --- but is probably not robust anyway because the admin may chose to not display the category description...

Regarding: "That said: what if you need to know that the content is an article introtext inside the category view (vs full article or category description)?" This fix only applies to category views. The way things currently are, the plugin cannot distinguish the two and is forced to actually check for the presence of the 'text' vs 'introtext' fields anyway. My plugins routinely do this because they have no choice!

avatar jmcameron jmcameron - reference | - 4 Dec 12
avatar jmcameron
jmcameron - comment - 13 Dec 2012

I will withdraw this pull request and work with Peter van Westen to get something fix into the fix that he is working on in http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=27699 and #589

-Jonathan

avatar jmcameron jmcameron - close - 13 Dec 2012

Add a Comment

Login with GitHub to post a comment