User tests: Successful: Unsuccessful:
Pull Request for Issue #9830
Create a single article with an intro and full image and a readmore
Set the article to registered only
Create a menu link to the article of type single article
In the menu options make sure show unauthorised links is set to show
Now check the menu item on the front end - you should see the introtext but not the intro image and when you login you see all the text and the full image
Apply the patch
Now check the menu item on the front end - you should see the introtext and the intro image and when you login you see all the text and the full image
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | ACL Components |
Rel_Number | 0 | ⇒ | 9830 |
Relation Type | ⇒ | Pull Request for |
Easy | No | ⇒ | Yes |
proposed some changes
sorry for the brevity (on the road...)
This PR has received new commits.
CC: @Webdongle
Updated to remove double votes
Works for me.
I have tested this item successfully on dc144b3
Tested successfully on cc44ae1
@rgmears Please mark test result on https://issues.joomla.org/tracker/joomla-cms/9865
Please mark test result on ....
I don't know how to do that. Sorry.
@rgmears @wojsmol its ok I manually added his test :)
I cannot test now (on a train with no test environ with me) but by simple code review it is evident that lines 137-140 are a duplicate of line 87.
Both echoes the content generated by "afterDisplayTitle" plugins (probably a very seldom used event, but anyway...) which in case will be duplicated...
In Joomla events list (https://docs.joomla.org/Plugin/Events/Content) I don't find "afterDisplayTitle": is it the same as "onContentAfterTitle"?
In https://docs.joomla.org/Plugin/Events/Content a note in the "onContentAfterTitle" event description says that
... this event has special purpose in com_content for use in handling the introtext.
but I'm unsure of what this is or could be as no further specification is given.
What is evident from code is that content generated by this event is displayed only if the "show_intro" param is set Edit: set to "Hide".
Confirmed by testing:
The "Test Aftertitle" plugin is:
<?php
defined('_JEXEC') or die;
class PlgContentTest_aftertitle extends JPlugin {
// onContentAfterTitle handler
public function onContentAfterTitle($context, &$article, &$params, $limitstart) {
return '<h3>This is generated by the "Test Aftertitle" plugin</h3>';
}
}
I have tested this item unsuccessfully on dc144b3
See above...
This PR has received new commits.
CC: @rgmears, @smz, @Webdongle, @woluweb
As the patch has been updated because of the fail when tested with the edited plugin ... should the Testing Instructions be updated to take into account that part of the test ?
In https://docs.joomla.org/Plugin/Events/Content a note in the "onContentAfterTitle" event description says that
... this event has special purpose in com_content for use in handling the introtext.
Has me totally confused and am unsure how to perform the test with the edited plugin ?
@Webdongle
TBH, I'm as much confused as you are, and probably quite more (but I'll elaborate about that later on)
As far as regards testing instructions the last word is of course @brianteeman's one, but I can explain what I did in the PR I proposed to Brian and he later incorporated, if this can help.
1) I eliminated the duplicate display of output generated for the "onContentAfterTitle". This wasn't there at the beginning and was introduced (by mistake, IMHO) in Brian's PR. Eliminating this, thus, doesn't change the expected behaviour and hence testing instructions.
2) I added an extra processing step so that the intro text is passed to the "onContentPrepare" handler. This fixes the issue of directives like {loadposition}
or {loadmodule}
appearing verbatim in the generated output instead of being processed. I added this as I interpreted this was Brian wish when (while closing #9830) he said:
... better code than suggested before as it uses the layout correctly and the plugins (i hope) (my emphasis )
This second change requires of course also testing that those directives are indeed honoured (as they are, from my testing).
About this second change I'm also unsure (and I expressed my doubts directly to Brian) if it is correct to do that here or it would be better to perform that at an higher level (at the view level, probably) so that not only this template, but also all other templates using the "intro text" would benefit of the fix.
The "Show intro text" option seems to be quite a strange beast. The description is:
If set to Show, the Intro Text of the article will show when you drill down to the article. If set to Hide, only the part of the article after the "Read More" break will show.
It indeed does that (intro text not displayed in the "Single Article" view if set to "Hide") but it also controls (with inverted logic) weather the content generated by the "onContentAfterTitle" should be displayed or not.
This is applied, apparently in an inconsistent way, throughout different views. For this, I think we'll need the memory of "old timers" to explain why this is done this way and what's the logic behind it (I'm calling @infograf768 for that, as apparently he did put his hands on that and probably should know...)
I have tested this item successfully on bc7d64c
Tested successful per instructions
I have tested this item successfully on bc7d64c
Testscenario executed successfully, intro-image is now shown in single-article view
I have tested this item successfully.
Intro Image shows.
{loadposition}
and {loadmodule}
both display content not code.
Tested successfully,
As quest you do not see the intro image while you should see the intro image.
Patch tested succesfully after patch intro image shows up as expected
I have tested this item successfully on bc7d64c
problem as described recreated and solved after patch
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Milestone |
Added: |
Forgive the uninformed question, but, what does RTC mean?
Forgive the uninformed question, but, what does RTC mean?
Ready To Commit
@brianteeman
So you think it is OK to fix the "onContentPrepare" issue here?
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-04-15 14:04:12 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
Create a new issue please
On 15 April 2016 at 15:04, Sergio Manzi notifications@github.com wrote:
@rgmears https://github.com/rgmears
Forgive the uninformed question, but, what does RTC mean?
Ready To Commit
@brianteeman https://github.com/brianteeman
So you think it is OK to fix the "onContentPrepare" issue here?—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9865 (comment)
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
about what?
Milestone |
Removed: |
Milestone |
Added: |
Milestone |
Added: |
Milestone |
Removed: |
I have tested this item unsuccessfully on 030de77
With Show Voting set to 'Show' ... the voting dropdown box displays twice to guests
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9865.