The code base for the 8.x is outdated, but it looks like we only need some adjustment to get the most things in place. These are the issues right now, that is relevant:
#2685135: PHP Fatal error: Call to undefined function format_xml_elements()
#2746987: Needs Indentation of files in views rss
#2746975: Removing @file doc comment in views rss
#2760991: On install, PHP Fatal error: Call to undefined method Drupal\\Core\\Cache\\DatabaseBackend::invalidateTags()
#2761079: Remove deprecated functions from views_rss_format.module
#2685113: Call to undefined method Drupal\\Component\\Utility\\SafeMarkup::set()
#2744449: Cannot use Drupal\Component\Utility\String in views_rss_cores.inc
#2425699: views_rss_core for D8 has wrong implementation of hook_views_rss_options_form_validate()
#2761635: Add automated test coverage
#3055051: Settings 'description-image' breaks the feed view
I am new co-maintainer of the 8.x branch and I will try to push this forward as fast as possible.
| Comment | File | Size | Author |
|---|
Comments
Comment #2
misc commentedComment #3
misc commentedComment #4
misc commentedComment #5
misc commentedComment #6
kniekel commentedAny chance that there will be a working version soon? I really need this module. Sorry, I don't know enough about programming to contribute myself.
Comment #7
Nate_S commentedHello I have brought the 8.x-2.x-dev into a working (Alpha) state on my project. I would like to contribute the changes to this ticket, do I just submit a patch?
Comment #8
generalconsensus commented@Nate_S. Please posted the patches here. I'm in desperate need to get a working version of this!
Comment #9
Nate_S commentedHere is a patch that applies to views_rss 8.x-2.x-dev 7210403 (2.x-dev#7210403)
Let me know if it works. It doesn't handle entity references very well but the original didn't either.
Comment #10
webchickMarking needs review to indicate there's a patch.
Comment #12
Nate_S commentedI have made some commits that should make views_rss work with Drupal 8. Testing of the changes here and with views_rss_itunes is encouraged. Let me know if there are any problems.
Not very familiar with the Drupal way of managing projects so if there is something I am doing wrong it is likely I just don't know any better. :)
Comment #13
quietcorn commentedIs this what the current 8.x-2.x-dev version is? The feed I'm trying to make with it is producing the correct header and footer, but it's not displaying any of my fields.
Comment #14
hilly510 commentedForgive me if I don't tag other issues correctly; I'm still fairly new at contributing patches.
In testing this out on a site, there were 3 main PHP messages being thrown in the logs, but 1 major error where nested XML elements were not being rendered correctly (the basic channel element image should contain XML elements for url, title, link, description, width, height). The D7 version of this module used format_xml_elements(), but the D8 version of the module is not leveraging the suggested replacement described here: https://www.drupal.org/node/2468139
I've attached a patch that adds an xml_element twig template and adjusted the code to use this instead of the 'html_tag' render element. This fixes the problem of nested XML elements (when applied correctly, where the child element is the correct render array).
For bonus points, this patch also includes the two other patches I submitted last week #3027921: Error: Class 'Drupal\media_entity\Entity\Media' not found in views_rss_core_preprocess_item_description_image() and #3027932: Notice: Undefined index: #image_style in views_rss_core_preprocess_item_enclosure().
It also fixed the problem in issue #3007533: User error : "value" is an invalid render array key dans Drupal\Core\Render\Element::children() where the render array being generated by style/RssFields.php was not formatted properly for the special channel elements of title, description, link, and language (correct render array structure nicely described here: https://www.drupal.org/project/drupal/issues/1283892#comment-5013866
I debated updating the whole module to short array syntax and other coding standards cleanup, but ended up leaving that out in order to produce a shorter patch for now. I will also be submitting a patch to views_rss_itunes that leverages the XML child element fix for the itunes:category and itunes:owner nested elements.
Comment #15
shane birley commented@hilly510,
I am getting close to a Drupal 8 upgrade one of my main sites that use Views RSS. I will conduct the upgrade next week and test the patch and send any feedback.
Comment #16
socialnicheguru commentedhttps://mysite.com/admin/structure/views/view/upcoming_events/edit/viewsrss|1||LogicException: Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPlain()/renderRoot() or #lazy_builder/#pre_render instead. in Drupal\Core\Render\Renderer->doRender() (line 241 of drupa8.6/core/lib/Drupal/Core/Render/Renderer.php).
Comment #17
shane birley commentedPatch installed. Configuration and testing commencing...
Unsure what the issue is for you, @socialnicheguru -- did you reinstall? When did you get the error?
Comment #18
shane birley commentedOkay, I have been hammering away at this today to test it out and have run across a couple of errors. I haven't delved into them that deeply.
Test View
View Feed Page with Format RSS Feed and Show RSS Feed - Fields. This is the same configuration as Views RSS in Drupal 7. Could be wrong for D8. Auto Preview fails.
Error 1 (Tossed Each Time Views Interface Loads or View Is Saved):
LogicException: Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPlain()/renderRoot() or #lazy_builder/#pre_render instead. in Drupal\Core\Render\Renderer->doRender() (line 241 of /core/lib/Drupal/Core/Render/Renderer.php).Error 2 (Tossed Each Time The View Is Modified):
Warning: htmlspecialchars() expects parameter 1 to be string, object given in Drupal\Component\Utility\Html::escape() (line 424 of /core/lib/Drupal/Component/Utility/Html.php)And further detail...
The feed does appear to generate correctly, however. I am looking further.
Comment #19
shane birley commentedUh, oh, I jiggled the handle:
More documentation of errors.
Comment #20
rob230 commentedWhat is the reason for porting this to Drupal 8? There is already a 'Feed' display type in Views of Drupal 8 core which outputs RSS. Does this module provide something extra besides that? I'm asking because I may have to upgrade some sites using this module in the future.
Comment #21
shane birley commentedIt provides additional fields required by systems such as iTunes Connect and other podcast services.
Comment #22
christian le fournis commentedAny update on a possible stable release for the d8 version?
Comment #23
ggiakoumidakis commentedIt works fine until I use an image url at the "description-image" at the Item Elements:Core, on RSS Feed - Fields display.
Then I get the error: Call to a member function getFileUri() on null in views_rss_core_preprocess_item_description_image() (line 439 of modules/views_rss/modules/views_rss_core/views_rss_core.inc).
I applied patch #14 but with no luck... Any ideas?
Comment #24
rhirst commentedUpdated patch to work with the shiny new release.
Comment #25
idebr commented#24 Your patch is probably more suited in #3055051: Settings 'description-image' breaks the feed view, as this is a meta issue documenting what should be fixed before tagging a new release.
Comment #26
gautam_sharan commentedIs there any working version of the module?
Comment #27
gautam_sharan commentedComment #28
damienmckennaPlease create child issues from this one for all issues you run into, please don't upload patches to this issue itself.
Comment #29
damienmckennaComment #30
damienmckennaI tagged rc1: https://www.drupal.org/project/views_rss/releases/8.x-2.0-rc1
Comment #31
damienmckennaThe module's output is pretty good after a few fixes, I think I'll tag another RC and then work on some docs.
Comment #32
damienmckennaI've tagged a new RC: https://www.drupal.org/project/views_rss/releases/8.x-2.0-rc2
I need to do a little more testing to make sure that this will work for my client's needs, and add docs, then it'll be ready for a stable release.
Comment #33
damienmckenna(updating the issue due to the module name change)
Comment #34
damienmckennaI tagged RC3: https://www.drupal.org/project/views_rss/releases/8.x-2.0-rc3
We just need some docs and then we can tag a stable release.
Comment #35
damienmckennaAnd it's done: https://www.drupal.org/project/views_rss/releases/8.x-2.0
Thank you everyone!
Work will continue in separate issues.