Comments

MiSc created an issue. See original summary.

misc’s picture

Issue summary: View changes
misc’s picture

Issue summary: View changes
misc’s picture

Issue summary: View changes
misc’s picture

Title: [META] Creating a stable, up to date, 8.x release » [META] Creating a stable, up to date, 8.x-2 release
kniekel’s picture

Any 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.

Nate_S’s picture

Hello 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?

generalconsensus’s picture

@Nate_S. Please posted the patches here. I'm in desperate need to get a working version of this!

Nate_S’s picture

StatusFileSize
new26.28 KB

Here 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.

webchick’s picture

Status: Active » Needs review

Marking needs review to indicate there's a patch.

  • Nate_S committed 046a35e on 8.x-2.x
    Issue #2761449 by Nate_S: [META] Creating a stable 8.x-2 release
    
Nate_S’s picture

I 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. :)

quietcorn’s picture

Is 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.

hilly510’s picture

Forgive 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.

shane birley’s picture

@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.

socialnicheguru’s picture

Status: Needs review » Needs work

https://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).

shane birley’s picture

Patch installed. Configuration and testing commencing...

Unsure what the issue is for you, @socialnicheguru -- did you reinstall? When did you get the error?

shane birley’s picture

Okay, 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...

#0 /core/includes/bootstrap.inc(587): _drupal_error_handler_real(2, 'htmlspecialchar...', '/core/includes...', 424, Array)
#1 [internal function]: _drupal_error_handler(2, 'htmlspecialchar...', '/core/includes...', 424, Array)
#2 /core/lib/Drupal/Component/Utility/Html.php(424): htmlspecialchars(Object(Drupal\Core\Url), 11, 'UTF-8')
#3 /core/lib/Drupal/Component/Render/FormattableMarkup.php(265): Drupal\Component\Utility\Html::escape(Object(Drupal\Core\Url)) 
#4 /core/lib/Drupal/Component/Render/FormattableMarkup.php(206): Drupal\Component\Render\FormattableMarkup::placeholderEscape(Object(Drupal\Core\Url)) 
#5 /core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(195): Drupal\Component\Render\FormattableMarkup::placeholderFormat('Select fields c...', Array)
#6 /core/lib/Drupal/Component/Utility/ToStringTrait.php(15): Drupal\Core\StringTranslation\TranslatableMarkup->render() 
#7 /sites/default/files/php/twig/5ce70ad99cc6c_details.html.twig_arnd6wKeN4tT4jTZNsmHBBpwd/S3s-1SRHuBVEIzqIX-BTXCLMO_Y0LXeoNBn4fyIwFLQ.php(91): Drupal\Core\StringTranslation\TranslatableMarkup->__toString() 
#8 /vendor/twig/twig/src/Template.php(427): __TwigTemplate_0df466a65090fa029e71baa058e725952f544d34af33d57eb22b89463d74ae0e->doDisplay(Array, Array) 
#9 /vendor/twig/twig/src/Template.php(398): Twig\Template->displayWithErrorHandling(Array, Array) 
#10 /vendor/twig/twig/src/Template.php(406): Twig\Template->display(Array) 
#11 /core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array) 
#12 /core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/sev...', Array) 
#13 /core/lib/Drupal/Core/Render/Renderer.php(493): Drupal\Core\Theme\ThemeManager->render('details', Array) 
#14 /core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) 
#15 /core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) 
#16 /core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) 
#17 /core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) 
#18 /core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, true) 
#19 /core/lib/Drupal/Core/Render/Renderer.php(139): Drupal\Core\Render\Renderer->render(Array, true) 
#20 /core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() 
#21 /core/lib/Drupal/Core/Render/Renderer.php(140): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) 
#22 /core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php(223): Drupal\Core\Render\Renderer->renderRoot(Array) 
#23 /core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php(125): Drupal\views_ui\Form\Ajax\ViewsFormBase->ajaxFormWrapper('Drupal\\views_ui...', Object(Drupal\Core\Form\FormState)) 
#24 /core/modules/views_ui/src/Form/Ajax/Display.php(46): Drupal\views_ui\Form\Ajax\ViewsFormBase->getForm(Object(Drupal\views_ui\ViewUI), 'feed_1', 'ajax') 
#25 [internal function]: Drupal\views_ui\Form\Ajax\Display->getForm(Object(Drupal\views_ui\ViewUI), 'feed_1', 'ajax', 'row_options') 
#26 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) 
#27 /core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() 
#28 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) 
#29 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) 
#30 /vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() 
#31 /vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) 
#32 /core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#33 /core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#34 /core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#35 /core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#36 /core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#37 /core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#38 /vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#39 /core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#40 /index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) 
#41 {main}.

The feed does appear to generate correctly, however. I am looking further.

shane birley’s picture

Uh, oh, I jiggled the handle:

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) 
#0 /modules/views_rss/src/Plugin/views/row/RssFields.php(273): views_rss_core_preprocess_item_description_image(Array) 
#1 /modules/views_rss/src/Plugin/views/style/RssFields.php(457): Drupal\views_rss\Plugin\views\row\RssFields->render(Object(Drupal\views\ResultRow)) 
#2 /core/modules/views/src/Plugin/views/display/Feed.php(106): Drupal\views_rss\Plugin\views\style\RssFields->render(Array) 
#3 /core/modules/views/src/ViewExecutable.php(1533): Drupal\views\Plugin\views\display\Feed->render() 
#4 /core/modules/views/src/Plugin/views/display/Feed.php(82): Drupal\views\ViewExecutable->render() 
#5 /core/modules/views/src/ViewExecutable.php(1630): Drupal\views\Plugin\views\display\Feed->execute() 
#6 /core/modules/views/src/Element/View.php(77): Drupal\views\ViewExecutable->executeDisplay('feed_1', Array) 
#7 [internal function]: Drupal\views\Element\View::preRenderViewElement(Array)
#8 /core/lib/Drupal/Core/Render/Renderer.php(378): call_user_func(Array, Array) 
#9 /core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, true) 
#10 /core/lib/Drupal/Core/Render/Renderer.php(139): Drupal\Core\Render\Renderer->render(Array, true) 
#11 /core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() 
#12 /core/lib/Drupal/Core/Render/Renderer.php(140): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) 
#13 /core/modules/views/src/Plugin/views/display/Feed.php(63): Drupal\Core\Render\Renderer->renderRoot(Array) 
#14 /core/modules/views/src/Routing/ViewPageController.php(52): Drupal\views\Plugin\views\display\Feed::buildResponse('test', 'feed_1', Array) 
#15 [internal function]: Drupal\views\Routing\ViewPageController->handle('test', 'feed_1', Object(Drupal\Core\Routing\RouteMatch)) 
#16 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) 
#17 /core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() 
#18 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) 
#19 /core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) 
#20 /vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() 
#21 /vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) 
#22 /core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#23 /core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#24 /core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#25 /core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#26 /core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#27 /core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#28 /vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#29 /core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #30 /index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) 
#31 {main}.

More documentation of errors.

rob230’s picture

What 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.

shane birley’s picture

It provides additional fields required by systems such as iTunes Connect and other podcast services.

christian le fournis’s picture

Any update on a possible stable release for the d8 version?

ggiakoumidakis’s picture

It 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?

rhirst’s picture

Status: Needs work » Needs review
StatusFileSize
new6.6 KB
new504 bytes

Updated patch to work with the shiny new release.

idebr’s picture

Issue summary: View changes
Status: Needs review » Active

#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.

gautam_sharan’s picture

Is there any working version of the module?

gautam_sharan’s picture

StatusFileSize
new4.08 KB
damienmckenna’s picture

Title: [META] Creating a stable, up to date, 8.x-2 release » Plan for stable release of Views RSS for Drupal 9
Category: Task » Plan

Please create child issues from this one for all issues you run into, please don't upload patches to this issue itself.

damienmckenna’s picture

Title: Plan for stable release of Views RSS for Drupal 9 » Plan for Views RSS 8.x-2.0 (for Drupal 9)
damienmckenna’s picture

damienmckenna’s picture

The module's output is pretty good after a few fixes, I think I'll tag another RC and then work on some docs.

damienmckenna’s picture

I'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.

damienmckenna’s picture

Title: Plan for Views RSS 8.x-2.0 (for Drupal 9) » Plan for Advanced Views RSS Feed 8.x-2.0 (for Drupal 9)

(updating the issue due to the module name change)

damienmckenna’s picture

Title: Plan for Advanced Views RSS Feed 8.x-2.0 (for Drupal 9) » Plan for Advanced Views RSS Feed 8.x-2.0 (for Drupal 9/10)

I 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.

damienmckenna’s picture

Status: Active » Fixed
Parent issue: » #3366697: Plan for Advanced Views RSS Feed 8.x-2.1

And it's done: https://www.drupal.org/project/views_rss/releases/8.x-2.0

Thank you everyone!

Work will continue in separate issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.