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.

Any way to distinguish new discussion from question?

When a user click New Discussion vs Ask a Question it takes the user to a page to enter text, but the screen is titled New Discussion no matter which one of the two they select. Anyway to make the title say "Ask a Question" on the corresponding selection. I'm guessing this won't be that easy.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    What version of QnA are you using?

    It should be changing the text according to: https://github.com/vanilla/addons/blob/master/plugins/QnA/class.qna.plugin.php#L1002

    That is version 1.2.1

    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.

  • Using latest version 1.2.1
    Double checked and that's not 100% accurate.
    I have some questions that have been posted, but when I test now when clicking the QnA button it goes into a Start Discussion post. AND it's posted as a discussion.

    I was under the wrong impression that it actually posts the question but just the titles didn't show up.

    To clarify at one point the QnA did work and there are some Questions posted. Also if I try to configure the post discussion (gear in upper right) I can go to QnA and convert it into a QnA manually.

    Will try to research more...
    Any troubleshooting advice?

  • P.S. using latest Vanilla 2.1.6

  • Found the missing puzzle...

    @peregrine said:

    The big Button Option Part B

    you also need to change QnA/modules/class.newquestionmodule.php

    from

    echo Anchor(T('Ask a Question'), '/post/discussion?Type=Question', 'Button BigButton NewQuestion');

    to

    echo Anchor(T('Ask a Question'), '/post/question', 'Button BigButton NewQuestion');
    
  • well that was short lived. now every time I click on a category it goes to this screen...
    I tried to undo the last step from post above but nothing changes.

    Unknown column 'd.CategoryID' in 'where clause'
    select *
    from GDN_Discussion Discussion
    where d.CategoryID = :dCategoryID
    The error occurred on or near: /home1/forum/library/database/class.database.php

    290: 
    291:          if (!is_object($PDOStatement)) {
    292:             trigger_error(ErrorMessage('PDO Statement failed to prepare', $this->ClassName, 'Query', $this->GetPDOErrorMessage($this->Connection()->errorInfo())), E_USER_ERROR);
    293:          } else if ($PDOStatement->execute($InputParameters) === FALSE) {
    294:             trigger_error(ErrorMessage($this->GetPDOErrorMessage($PDOStatement->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
    295:          }
    296:       } else {
    297:          $PDOStatement = $this->Connection()->query($Sql);
    298:       }
    

    line 294 is highlighted in red

  • R_JR_J Ex-Fanboy Munich Admin

    Simply download the plugin again and copy the files on your server. If you've only changed something in that plugin, everything should be fine afterwards. You can then apply the change for the button.

  • I hear what you're saying. Already tried disabling the plugin, deleting it, and reinstalling it. Tested the forum at each point and no go. From what I've researched my assumption is that there's something going on with the database.

  • R_JR_J Ex-Fanboy Munich Admin

    If you've only made small changes to some files, it is unlikely that you've destroyed your db. Try www.yourforum.com/utility/structure a few times to get things in order, if you like to. It doesn't hurt.

    If it doesn't give you the creeps, I would suggest you also copy the original Vanilla files over to your server (but without .htaccess). Just to be sure that you haven't changed a core file without noticing it (happens to me more often than I would admit, though I have an excuse every time!)

    Do you get that error everytime you click on yourforum.com/somecategoryname?

  • peregrineperegrine MVP
    edited December 2014

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

  • Thank you!!!
    It turns out when I turned off PostApproval 1.0b2 plugin it cleared up most of it.
    It wasn't QnA after all.

Sign In or Register to comment.