HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Bugfixing RSS-Feeds for Tagging plugin in Vanilla 2.2

I think I've found a bug in the Tagging plugin in vanilla 2.2. At the near end of the function TaggingPlugin::discussionsController_Tagged_create($Sender), the following code line is problematic:
$this->View = c('Vanilla.Discussions.Layout') == 'table' ? 'table' : 'index';

If the DiscussionLayout is set to table and the RSS feed is requested (/discussions/Tagged/xyz/feed.rss), then a non-existent view table_rss is searched and not found. As far as I can see, this is independent from the selected theme, because I haven't found such a file in the whole vanilla-core package. I've fixed this bug by adding an additional condition which results in the following line:

$this->View = c('Vanilla.Discussions.Layout') == 'table' && $Sender->SyndicationMethod == SYNDICATION_NONE ? 'table' : 'index';

I propose to integrate this bugfix in the official code.

Comments

  • Options

    There is another issue in the Tagging plugin: If vanilla is installed in a sub-directory (e.g. /forum/), then the breadcrumbs on a page for a tag (e.g. /forum/discussions/tagged/XYZ) are defective, i.e. the last entry targets to /forum/forum/discussions/tagged/XYZ (the sub-dir name twice).

    I think this is caused by multiple calls to url() with inauspicious parameters, i.e. the parameter $WithDomain. I could fix this by changing the code line 293 and 297 of plugins/Tagging/class.tagging.plugin.php from
    $Breadcrumbs[] = array('Name' => $ParentTag['FullName'], 'Url' => TagUrl($ParentTag)); $Breadcrumbs[] = array('Name' => $CurrentTag['FullName'], 'Url' => TagUrl($CurrentTag)); to
    $Breadcrumbs[] = array('Name' => $ParentTag['FullName'], 'Url' => TagUrl($ParentTag, '', '/')); $Breadcrumbs[] = array('Name' => $CurrentTag['FullName'], 'Url' => TagUrl($CurrentTag, '', '/'));

  • Options

    I've provided these issues as pull request on Github.

Sign In or Register to comment.