-
-
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
[5.3] Fix for missing Fulltext Image in Newsfeeds #38058
base: 5.3-dev
Are you sure you want to change the base?
Conversation
@AndySDH Could you fix the code style errors reported by drone here https://ci.joomla.org/joomla/joomla-cms/55308/1/6 ? Thanks in advance. |
@richard67 Should be done :) |
@AndySDH Not really. There are still some complaints: https://ci.joomla.org/joomla/joomla-cms/55316/1/6 |
@AndySDH Still not ok: https://ci.joomla.org/joomla/joomla-cms/55320/1/6 . |
Well it's going in circles a bit. If I take out those spaces, the indentation will look off. I'm not sure that's a valid complaint there, not sure. |
@AndySDH It is a valid complaint. The indentation of the “=“ and the lines below do not need to be aligned. Furthermore the lines below should be indented with tabs. I would also suggest to put the operators “?” and “:” of the ternaries to the beginning of a line and not the end of the previous line. And I would indent the 2nd ternary by one tab more than the first one. Maybe check how it is done elsewhere. |
Hey there, can this please be merged? |
You need to fic the codestyle issues https://ci.joomla.org/joomla/joomla-cms/76705/1/7 |
How do I fix? Didn't it use to be automatic with the click of a button? Can't see it anymore |
No you have to fix it in your branch and push the changes |
And what is the fix I need to make? I can't tell from the phpcs log, it's not very clear. |
Co-authored-by: Brian Teeman <brian@teeman.net>
Thank you, committed :) |
Could someone please retrigger drone so we can see what its failing on |
Using menu item type "Category Blog" for a feed works as described. Using menu item type "Featured Articles" for a feed give 0 No registered feed parser for type error. Call Stack
Test System Information: PHP Built On Darwin Air.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64 x86_64 |
@fgsw Doesn't seem related to this PR. The file changed in this PR has nothing to do with the error trace you've shown. |
@@ -53,8 +53,15 @@ protected function reconcileNames($item) | |||
$item->description = ''; | |||
$obj = json_decode($item->images); | |||
|
|||
// Ensure alt properties are set | |||
$obj->image_intro_alt = $obj->image_intro_alt ?? ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If $obj
is null, then the following error:
<?xml version="1.0" encoding="UTF-8"?>
<error>
<code>0</code>
<message>Attempt to assign property "image_intro_alt" on null</message>
</error>
Checking for the alt property should not be necessary so remove the check/assignment.
PS: The code is self explanatory so these comments don't provide additional information.
I have tested this item ✅ successfully on 03ec896 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38058. |
This pull request has been automatically rebased to 5.3-dev. |
As requested, Joomla 4.2 re-do of Pull Request #28195
Summary of Changes
Originally Joomla RSS Newsfeeds were completely missing the image_intro and image_fulltext. This was partially fixed with this PR: #11402
But that only introduced the image_intro, and forgot the image_fulltext.
So an article that had an image_fulltext would not use that image in the feed.
This PR simply adds the image_fulltext to the feed if the image_intro is empty, for both the category view and featured view.