-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including core_params field in SELECT #6792
Conversation
In my project I needed to access `attribs` field from #__content which is stored as `core_params` in #__ucm_content. This commit will allow to access this field when outputting tags related articles. It's especially useful if you have custom parameters associated with your article.
Can you supply some ample code to make it easier for people to test this On 17 April 2015 at 09:11, Oleksandr Panasenko notifications@github.com
Brian Teeman |
So, basically there's only one line added, it has effect on gettagitemsquery() method defined at /libraries/cms/helper/tags.php -> line 467 and referenced only in one place: Tag model /components/com_tags/models/tag.php -> line 147. With this change the contents of the object returned in response to call getItems() of this model will be added with one more field |
Ouch, that query looks awful already... Looking at the other selects I don't think that will work. The whole query is a group one, the #__ucm_content is a joined table and may or may not return multiple matching rows. The other selects all use MAX() to make sure only one row is returned. |
I don't know if it's needed or not. But all other cases where something is fetched from the same table ( |
Just checked, it works on multiple elements too. I have 3 articles matching a tag: all have |
I think it's needed because we should have access to all the parameters of an article whether it's returned. In other places: content modules or com_content views we have access to |
I've tried to brace |
I'd say either all of the selects from |
Ok, I'll add another commit with the MAX, and you'll see merge it or not. Btw, is it possible to edit this pull request to reflect new changes with our discussion or I need to create a new one? |
The PR updates automatically with your new commit 😄 If you edit your first post and add detailed testing instructions, then it will be tested faster and could be merged. |
@test SUCCESS Some test instructions because @oldrpan didn't provide them:
Directly after line 63
add a new line
|
Tested like described and successfull :) This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6792. |
Thank you @oldrpan! Merged. |
In my project I needed to access
attribs
field from #__content which is stored ascore_params
in #__ucm_content. This commit will allow to access this field when outputting tags related articles. It's especially useful if you have custom parameters associated with your article.