Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Addons Issue 60] Quotes/BBCode bug - not displaying username in quote. 2.1

2»

Comments

  • grep is your friend.

  • LeeHLeeH
    edited May 2013

    Downloaded and tried things with NBBC. Normal formatting works fine, but quotes are horribly broken, with the quote's contents being rendered as text + HTML entities instead of parsable code:

    <div class="Message"> <!-- BBCode --> &lt;blockquote class=&quot;UserQuote&quot;&gt;&lt;div class=&quot;QuoteAuthor&quot;&gt;&lt; a href=&quot;/profile/&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt; said:&lt;/div&gt;&lt; div class=&quot;QuoteText&quot;&gt;&lt;p&gt;First reply. Quote me!&lt;/p&gt;&lt;/div&gt;&lt; /blockquote&gt;<br /> Second reply, first quote.<br /> <!-- End BBCode --> </div>

  • LeeHLeeH
    edited May 2013

    @hgtonight said:
    LeeH Sorry about that, I must have glazed over. XD

    What I would do is run a diff on your site vs. the base download (or git commit it was based on). This should bring > up all the changes you have made.

    I'll start walking through a diff now, but I'm not anticipating any substantive changes. Both my prod forum and also the test forum I'm fiddling with right now were fresh installs of 2.1b1 using the download link in the 2.1b release thread. Other than a few plug-ins and the contents of my custom theme's directory, the contents ought to be totally identical.

  • x00x00 MVP
    edited May 2013

    there is some inconsistency here the user is not proceessed

    this is the pattern #(\[quote(\s+author)?=[\"']?(.*?)(\s+link.*?)?(;[\d]+)?[\"']?\])#usi

    this is the callback

       protected function QuoteAuthorCallback($Matches) {
          $Attribution = T('%s said:');
          $Link = Anchor($Matches[2], '/profile/'.$Matches[2], '', array('rel' => 'nofollow'));
          $Attribution = sprintf($Attribution, $Link);
          return <<<BLOCKQUOTE
          <blockquote class="UserQuote"><div class="QuoteAuthor">{$Attribution}</div><div class="QuoteText"><p>
    BLOCKQUOTE;
       }
    

    according to that is is using $Matches[2], if you count the parenthesis you would expext it to be at least $Matches[3]

    in fact if you did

    [quote author="somebody"]some text[/quote]

    you are likely to get

         <blockquote class="UserQuote">
              <div class="QuoteAuthor"> <a href="/profile/ author" rel="nofollow"> </a> said:</div>
              <div class="QuoteText"> <p>/replies with no text again!!</p> </div>
         </blockquote>
    

    not

         <blockquote class="UserQuote">
              <div class="QuoteAuthor"> <a href="/profile/somebody" rel="nofollow"> </a> said:</div>
              <div class="QuoteText"> <p>/replies with no text again!!</p> </div>
         </blockquote>
    

    so try changign to $Matches[3] in that callback, and if it work you can report the bug.

    grep is your friend.

  • LeeHLeeH
    edited May 2013

    Yep, other than some operational miscellany (additional plugins, contents of the cache directory, specific entries in config files, the uploads directory), there are no file changes between the contents of a new downloaded 2.1b1 archive and my deployed versions.

    Annoyingly, it sounds like this is dead-on related to having InputFormatter set to bbcode. Even more annoying that it worked without issue when I was on a 2.1a clone from github. I'm contemplating reverting, since my users are complaining, loudly, and this is a very visible problem.

  • @x00 said:
    so try changign to $Matches[3] in that callback, and if it work you can report the bug.

    Ah HA! That appears to have TOTALLY FIXED the problem on the test forum!!

    Let me roll the change into the production forum and see if it also works there. One moment.

  • LeeHLeeH
    edited May 2013

    Confirmed—changing $Matches[2] to $Matches[3] in class.quotes.plugin.php has resolved the issue!

    @x00, I love you :)

    How do I go about reporting the bug?

  • Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I'm happy to report it there, but the Quotes plug-in doesn't come with Vanilla and doesn't look like it's in the repo under any of the branches.

  • peregrineperegrine MVP
    edited May 2013

    maybe since @Tim "of the vanilla team" wrote it you can still report it.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I thought it was in the distributed version.

    Here is a link to the addons repo issues: https://github.com/vanillaforums/Addons/issues

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • TimTim Vanilla Staff
    via Email
    Try enable the NBBC plugin.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • @Tim said:
    Try enable the NBBC plugin.

    Hey @Tim—tried that on page 1 and it didn't appear to fix things. Do you want me to try it again now that I've implemented @x00's fix?

  • grep is your friend.

  • Opened bug report.

  • phreakphreak MVP
    edited June 2013

    I'd also have to confirm i'm running into this under 2.0.18.8. Quotes 1.6.1 seems to work properly under 2.0.18.8 (when the fix is applied).

    @Tim: Can you apply the pretty small codefix to the plugin so other users are not getting irritated? Thanx

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • jrapagejrapage New
    edited July 2014

    I just rolled over to 2.0.18.8 and had to apply the fix - works a treat now.

    @Tim - The Quotes plug in should be updated

Sign In or Register to comment.