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

fatal errors

edited May 2012 in Feedback

with debug there are some fatal errors.

Answers

  • wanhalo said:
    with debug there are some fatal errors.

    Ah, good to know, thanks for the post :-)

    There was an error rendering this rich post.

  • you are welcome :)

  • I believe I have provided a temporary fix to this. You can download the 'tweaked' plugin: http://askaboutapple.com/uploads/tagging.zip

    I have it functioning on my site (http://askaboutapple.com) so feel free to take a look. The problem is simply poor coding. But for good measure follow the steps below..

    1) Ensure you have Vanilla's default Tagging system installed. 2) Deactivate then reactivate Vanilla's Default system. 3) Override the files in /plugins/taggings/ with the .Zip ones.

    It should function correctly. The problem was down to very poor coding. Capital letters, SQL Functions etc. I have basically patched them.

    Let me know how you get on.

  • That's awesome, thanks for the updated version. I'll try to either add it to the actual tagging version or to the Tagging Enhanced version, whichever is best.

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited July 2012

    @underdog - I would think it should be changed in tagging enhanced.

    the crux of it is a few deletions in original enhanced code in two files.

    and upper-casing d to D for Discussions.

    class.tagging.plugin.php
    
    13c13,14
    <    'Name' => 'Tagging Enhanced Bug Fixes',
    ---
    
    
      'Name' => 'Tagging Enhanced',
    
    
    Delete this chunk
    
    52a54,64
    
    
    * Display the tag module in a discussion.
    */
    

    public function DiscussionController_Render_Before($Sender) {
    $this->_AddTagModule($Sender);

    //JP: Test to get all the data of a single discussion
    //PrettyPrint(var_dump($Sender->Data['Discussion']->DiscussionID)); //Get Discussion Id
    }

    /**

    Uppercase the D 57a70,76

    /**
    * Display the tag module on discussions lists.
    */
    public function CategoriesController_Render_Before($Sender) {
    $this->_AddTagModule($Sender);
    }

    265c284 < $Sender->View = 'Discussions'; ---
         $Sender->View = 'discussions';
    
    302c321 < $CategoryID = $Sender->SQL->Select('CategoryID')->From('Discussion')->Where('DiscussionID', $DiscussionID)->Get()->FirstRow()->CategoryID; ---
      $CategoryID = $Sender->SQL->Select('CategoryID')->From('discussion')->Where('DiscussionID', $DiscussionID)->Get()->FirstRow()->CategoryID;
    
    632c651 < $CategoryID = $Sender->SQL->Select('CategoryID')->From('Discussion')->Where('DiscussionID', $DiscussionID)->Get()->FirstRow()->CategoryID; ---
      $CategoryID = $Sender->SQL->Select('CategoryID')->From('discussion')->Where('DiscussionID', $DiscussionID)->Get()->FirstRow()->CategoryID;
    
    -------- in class.module.php this replaced 134,140c134,169 < <?php < if (urlencode($Tag->Name) == $Tag->Name) { < echo Anchor(htmlspecialchars($Tag->Name), 'discussions/tagged/'.urlencode($Tag->Name)); < } else { < echo Anchor(htmlspecialchars($Tag->Name), 'discussions/tagged?Tag='.urlencode($Tag->Name)); < } < ?> <?php echo number_format($Tag->CountDiscussions); ?> --- this

    <?php
    switch ($this->_ControllerData['Controller']) {
    case "Discussion":
    $TagLinkURL = (T("discussions/tagged/")); if (urlencode($Tag->Name) == $Tag->Name) {
    echo Anchor(htmlspecialchars($Tag->Name), $TagLinkURL.urlencode($Tag->Name));
    } else {
    echo Anchor(htmlspecialchars($Tag->Name), $TagLinkURL."?Tag=".urlencode($Tag->Name));
    }
    break;

    case "Categories":
    $TagLinkURL = (T("categories/tagged/"));
    $TagLinkURLCatData = "&catid=".$this->_CategoryID;

    if (urlencode($Tag->Name) == $Tag->Name) {
    echo Anchor(htmlspecialchars($Tag->Name), $TagLinkURL.urlencode($Tag->Name).$TagLinkURLCatData);
    } else {
    echo Anchor(htmlspecialchars($Tag->Name), $TagLinkURL."?Tag=".urlencode($Tag->Name).$TagLinkURLCatData);
    }
    break;

    case "Discussions":
    default:
    $TagLinkURL = (T("discussions/tagged/"));

    if (urlencode($Tag->Name) == $Tag->Name) {
    echo Anchor(htmlspecialchars($Tag->Name), $TagLinkURL.urlencode($Tag->Name));
    } else {
    echo Anchor(htmlspecialchars($Tag->Name), $TagLinkURL."?Tag=".urlencode($Tag->Name));
    }
    break;
    }
    ?>
    <?php echo $Tag->CountDiscussions; ?>

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

Sign In or Register to comment.