I am trying to build a calendar rss feed from views. The rss.xml is being generated, but it doesn't appear to be accepted as a calendar rss on local systems.
When I look at the source, I see it's shot through with theme debugging comments.
<!-- THEME DEBUG --> <!-- THEME HOOK: 'views_view_rss' --> <!-- BEGIN OUTPUT from 'core/modules/views/templates/views-view-rss.html.twig' --> <?xml version="1.0" encoding="utf-8" ?> ...
Worryingly, I'm also getting escaped angle brackets in some places:
<!-- THEME DEBUG --> <!-- THEME HOOK: 'views_view_row_rss' --> <!-- BEGIN OUTPUT from 'core/modules/views/templates/views-view-row-rss.html.twig' --> <item> ... <!-- THEME DEBUG --> <!-- THEME HOOK: 'ds_entity_view' --> <!-- BEGIN OUTPUT from 'modules/contrib/ds/templates/ds-entity-view.html.twig' --> ...
I'm not an expert on the theming system. I googled for how to turn off theme debugging, but I used drush to issue this command:
$ drush state-set theme.debug 0 $ drush @local sget theme.debug 0 $ drush @local cr Cache rebuild complete.
However I am still getting the theme debugging comments in my rss.xml.
How do I disable theme debugging?
Edit I looked at my
39 twig.config: 40 # Twig debugging: 41 # 42 # When debugging is enabled: 43 # - The markup of each Twig template is surrounded by HTML comments that 44 # contain theming information, such as template file name suggestions. 45 # - Note that this debugging markup will cause automated tests that directly 46 # check rendered HTML to fail. When running automated tests, 'debug' 47 # should be set to FALSE. 48 # - The dump() function can be used in Twig templates to output information 49 # about template variables. 50 # - Twig templates are automatically recompiled whenever the source code 51 # changes (see auto_reload below). 52 # 53 # For more information about debugging Twig templates, see 54 # https://www.drupal.org/node/1906392. 55 # 56 # Not recommended in production environments 57 # @default false 58 debug: false
This doesn't seem to be the issue, unless I misunderstood or misread.
Edit 2 Following the advice in the comments, I've made the following edits in my configuration:
- commented out the line loading
Here are the changes:
$ git diff diff --git a/sites/default/services.yml b/sites/default/services.yml index c6c9e71b9..be755d7a1 100644 --- a/sites/default/services.yml +++ b/sites/default/services.yml @@ -75,7 +75,7 @@ parameters: # # Not recommended in production environments # @default true - cache: true + cache: false renderer.config: # Renderer required cache contexts: # diff --git a/sites/default/settings.php b/sites/default/settings.php index 04b8a66e2..a61098d01 100644 --- a/sites/default/settings.php +++ b/sites/default/settings.php @@ -3,7 +3,7 @@ /** * Load services definition file. */ -$settings['container_yamls'] = __DIR__ . '/services.yml'; +# $settings['container_yamls'] = __DIR__ . '/services.yml'; /** * Include the Pantheon-specific settings file. diff --git a/sites/development.services.yml b/sites/development.services.yml index 0553016c1..bdf4461b9 100644 --- a/sites/development.services.yml +++ b/sites/development.services.yml @@ -5,7 +5,7 @@ parameters: http.response.debug_cacheability_headers: true twig.config: - debug: true + debug: false auto_reload: true cache: false services:
And of course, I've done a cache rebuild. I also decided to do a fresh backport, just in case. But, I'm still getting the debugging comments. Here's a partial screenshot of the views preview:
Edit It turns out, I didn't have
development.services.yml in my
settings.php (I had commented out a line loading a different yaml file).
$ grep development.services.yml settings.php $