Problem/Motivation

Follow up from #1857256: Convert the taxonomy listing and feed at /taxonomy/term/%term to Views

Steps to reproduce:
1. Attach feed display to a page with arguments:
- edit taxonomy term view feed display at /admin/structure/views/view/taxonomy_term/edit/feed_1
- below "Feed settings" is a setting "Attach to: None"
- click "None", check "Page", click "Apply" and save the view.
2. Add an article with a tag "Tag1"
3. Go to /taxonomy/term/1

Expected: At the bottom of the page is a feed icon link to /taxonomy/term/1/feed with title "Subscribe to Tag1".

Actual: At the bottom of the page is a feed icon link to /taxonomy/term/%2A/feed with title "Subscribe to ".

Proposed resolution

In Feed::attachTo() copy the original arguments the same way as in Attachment::attachTo().

Remaining tasks

Commit it.

User interface changes

Feed link title will be updated

API changes

None

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new1.5 KB

This is one approach to solve it.

xjm’s picture

xjm’s picture

Issue tags: +Needs tests
olli’s picture

StatusFileSize
new1.44 KB

Reroll, no tests yet. One question:

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php
@@ -38,7 +38,7 @@ public function attachTo($display_id, $path, $title) {
-    $url = url($this->view->getUrl(NULL, $path), $url_options);
+    $url = url($this->view->getUrl(!empty($this->view->args) ? $this->view->args : NULL, $path), $url_options);

Is this needed? If NULL is passed it uses $this->args anyway.

dawehner’s picture

Is this needed? If NULL is passed it uses $this->args anyway.

This is why we need test coverage :)

olli’s picture

Issue tags: -Needs tests
StatusFileSize
new7.32 KB
new7.96 KB
new2.08 KB

I found that the attachment display already copies arguments and that could also work for feed displays. Here's a test.

The last submitted patch, 6: vdc-2251121-fail.patch, failed testing.

mgifford’s picture

What's the fastest way to manually verify this?

olli’s picture

StatusFileSize
new8.01 KB

Reroll.

Re #8:
0. edit taxonomy term view feed display at /admin/structure/views/view/taxonomy_term/edit/feed_1
- below "Feed settings" is a setting "Attach to: None"
- click "None", check "Page", click Apply and Save.
1. add an article with a tag "Tag1"
2. go to /taxonomy/term/1

At the bottom of the page is a feed icon link to /taxonomy/term/all/feed with title "Subscribe to ".

3. apply this patch and reload /taxonomy/term/1

At the bottom of the page is a feed icon link to /taxonomy/term/1/feed with title "Subscribe to Tag1".

Status: Needs review » Needs work

The last submitted patch, 9: 2251121-9.patch, failed testing.

olli’s picture

Status: Needs work » Needs review
StatusFileSize
new8.03 KB
new1.75 KB
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_feed_icon.yml
@@ -23,7 +23,6 @@ display:
         type: role
         options:
           role:
-            anonymous: anonymous
             authenticated: authenticated
         provider: user

#2375107: Unable to allow multiple roles access views page

mgifford’s picture

Status: Needs review » Needs work
StatusFileSize
new9.84 KB

Without the patch I see core/misc/feed.png

With the patch I don't see the icon or the link to taxonomy/term/all/feed

Thanks for the details in #9 about how to test this.

olli’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs issue summary update
StatusFileSize
new8.21 KB
new5.95 KB

Rerolled and recreated the test view.

Copied the steps from #9 to issue summary. Without this patch the link is now to taxonomy/term/*/feed which is 404 Not found.

@mgifford, Are you sure there is no link to taxonomy/term/1/feed on the term page taxonomy/term/1 with the patch after changing the "Attach to:" setting? If not, could you export and upload the view?

jibran’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Parent issue: » #1857256: Convert the taxonomy listing and feed at /taxonomy/term/%term to Views
StatusFileSize
new45.01 KB

Works as described in #9

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed f213f85 and pushed to 8.0.x. Thanks!

  • alexpott committed f213f85 on 8.0.x
    Issue #2251121 by olli, dawehner: Support to add a feed icon on pages...

Status: Fixed » Closed (fixed)

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