- Issue created by @joegl
- πΊπΈUnited States joegl
I'm guessing since this isn't widespread that it's something unique in our stack/setup or a hook we have somewhere.
- πΊπΈUnited States DamienMcKenna NH, USA
Does the View include unpublished content?
Please try the patch from π RSS output is no longer valid XML Fixed to see if it resolves the problem.
- πΊπΈUnited States joegl
The view has a filter to filter out Unpublished content and it does not show Unpublished content from what I can tell. I will try the patch and get back to you. Thanks for your help!
- πΊπΈUnited States joegl
Patch unfortunately did not resolve the issue.
- πΊπΈUnited States joegl
This doesn't affect the Preview section of the view. It only affects the rendered view. And the saving of a node as unpublished as the trigger is suspicious. I am guessing the issue is occurring when it builds the cache of the rendered view after saving content. I'm not exactly sure of the best way to debug, but if I could get a stack trace of the render pipeline I could see if maybe we have a custom hook or code affecting this.
- πΊπΈUnited States DamienMcKenna NH, USA
How many published nodes are there supposed to be?
- πΊπΈUnited States joegl
As many as are available. The amount doesn't seem to matter.
- πΊπΈUnited States DamienMcKenna NH, USA
Does the output change if you switch to a core theme instead of the normal site theme?
- πΊπΈUnited States joegl
I switched to the Stark theme and was able to still reproduce the issue.
- πΊπΈUnited States joegl
I did some debugging of the views-view-rss.html.twig
{{ dpm(items) }}
I returned NULL for the items when I saved the unpublished node.
So something is breaking the rendered items when I save an unpublished node.
Also, after I saved an unpublished node, the view breaks. When I rebuild the cache either through UI or a drush cr, the view is still not working. However, if I re-save the view and try to load it, it works.
- πΊπΈUnited States DamienMcKenna NH, USA
Are you able to reproduce the problem with a bare install of D9 or D10, without any extra contrib or custom modules?
- πΊπΈUnited States joegl
That's what I plan to do next. Probably won't get to it until January but I will report back
- πΊπΈUnited States joegl
I finally got around to testing this on a vanilla drupal install using
drupal/recommended-project
and was not able to reproduce this - πΊπΈUnited States joegl
I've created views of different types and this only happens with feeds created with `views_rss`. I created an XML feed with `views_data_export` and it did not have this problem. I also created an XML Feed with REST Export and it did not suffer from this issue. Even though I couldn't reproduce it on a vanilla drupal install, there appears to be something with this module specifically that causes this problem. Unfortunately the aforementioned modules don't allow for the creation of a "true" RSS Feed. We may end up coming up with an in-house solution to generate the feed but it would be nice to figure out what's going on here.
FWIW, I've also struggled a lot trying to debug the code in this module with `dpm` and `var_dump`. I've never been able to get any output from either of those in any part of the code for this module.
- πΊπΈUnited States joegl
Well this is interesting.
We were not using the
views_rss
module for our feed. I wasn't aware the RSS feed in views was part of Drupal core, which appears to be what we're using. That would explain the dpm/var_dump thing. However, once I uninstalled theviews_rss
module from the site, the problem completely disappeared. I'm going to run a few more tests to confirm, otherwise this is probably resolved. - Status changed to Closed: cannot reproduce
9 months ago 10:30pm 12 March 2024 - πΊπΈUnited States joegl
I'm happy to closet his now, just not sure what closed status is most applicable here. I'm going to pick "cannot reproduce".
- πΊπΈUnited States DamienMcKenna NH, USA
Thanks for letting us know.
If you end up spotting the source of the bug I'd be happy to look more.