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.
Options

Why can guests react to posts?

cclubbcclubb New
edited September 2014 in Vanilla 2.0 - 2.8

Hi,

I am loving this addon, but I just got it installed and am having some issues.

I want to start off by saying I am a new Vanilla Forum user, I have used vbulletin and phpbb for years but I wanted to try something new for a new site I am working on. I installed Vanilla a few days ago (newest version) and have only tinkered with adding categories and the yaga application.

I have slightly modified a few reaction conditions (points, names, etc). Other than that everything is standard.

The main problem I am having is as follows:
When I am logged in (only user & admin at this time) I don't see the reactions listed by my posts. I assume this is normal as you don't want people voting on their own posts. Perfect. When I log out and view the forums as a guest, I can see the reactions -- Also good, because it lets me know the application is working. However, when I click on an emotion as a guest it logs the emotion and gives my admin account a badge for getting the first of whatever emotion was clicked. This happens in whatever internet browser I use. However, it only logs one click. So if I click "Insightful" in IE and then use Forefox and click the heart -- the insightful point will go away and will add a point to the heart.

Checking the permissions on both the forums settings and the application -- guests are only supposed to be able to view the system, or forums, not vote. Is what I have described normal behavior? I would assume the forum should give an error message saying I can't vote until I sign in -- Like how it works on these forums. Am I stuck somewhere between a member (ip address) and guest (application session) on my forums when I log out?

My second issue is that no matter what theme I use, the clicked emotions on a post display are displayed slightly out of line to the left of the post block making the post page look sloppy.

If you want to try this out and/or see the out of line display check out the forums. They are not linked from the main site yet, so if you need to test something out or create an account that's perfectly fine.

Here is the link: suzukiauxcables.com/forums/discussion/2/read-this-before-posting#latest

Thanks in advance.

«1

Comments

  • Options
    peregrineperegrine MVP
    edited September 2014

    probably needs a change in about.php

    from

     'RegisterPermissions'  => array(
            'Yaga.Reactions.Add' => 1,    // Can a user click on reactions?
    
    to 
    
     'RegisterPermissions'  => array(
            'Yaga.Reactions.Add' => 0,    // Can a user click on reactions?
    

    you could also change the permissions table

    on row for guest role (role id 2) needs to have a 0 in column yaga.permissions.add

    UPDATE GDN_Permission SET Yaga.Reactions.Add = '0' WHERE RoleID =2;

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

  • Options

    Thanks for the quick reply ...

    However, I tried that and still get the same behavior. I am able to click and log a vote as a guest. It still removes the previous guest vote it seems as well. Not sure if that's relevant or not.

  • Options
    peregrineperegrine MVP
    edited September 2014

    try with mysql or phpmyadmin

    UPDATE GDN_Permission SET Yaga.Reactions.Add = '0' WHERE RoleID =2;

    but i'm just making noise until Master Yaga sets the record straight, :)

    Unless the intention was to let a guest have a bonus single reaction vote per comment or discussion.

    and also the reactions table might have to be cleaned up via a sql statement to delete them, because it will have reactions left over from guests who added reactions signified by insertuserid = 0

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

  • Options

    The value is at 0. Is that correct or change it to 2?

  • Options
    peregrineperegrine MVP
    edited September 2014

    no.

    if the value in Yaga.Reactions.Add is set to 0 for roleid 2 (guests) in the permissions table - then they should no longer be able to react.

    re-read edited comment above.

    but I would wait till hgtonight clears it up whether it is intended or a minor issue.

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

  • Options

    Ok, I edited that value and now as a guest I can no longer see the reactions at all. Even though the Yaga.Reactions.View is set to 1 ...? I would like the guests to be able to still see the reactions -- just not vote.

    Also, it should be noted, I didn't mess with the permissions AT ALL after installing the application. So I'm a tad bit confused on why I am having to do DB edits. lol

  • Options
    peregrineperegrine MVP
    edited September 2014

    your other issue - you are using the default theme. baseline i assume. This is a model to clone and for you to style via css.

    switch to bittersweet if you want better mark up.

    Also, it should be noted, I didn't mess with the permissions AT ALL after installing the application. So I'm a tad bit confused on why I am having to do DB edits. lol

    possibly because you may have found a bug.

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

  • Options
    cclubbcclubb New
    edited September 2014

    Switched the theme, also I made three temp test accounts for you (or anyone) to mess with if you so desire.
    test1, test2 & test3 -- passwords are same as usernames.

    And I seem to be an expert at finding bugs ;)

    Also, any idea on why the reaction icons (the cones which have been tallied) are displaying so far left (in all themes). EDIT -- Also, I just realized they are stacking on top of each other... Yay!

    Thanks for your continued help btw! You're awesome.

  • Options
    peregrineperegrine MVP
    edited September 2014

    you can do what you want with themes. you are in control if you want to be.

    read the theme tutorials.

    adjust the custom.css in the theme

    e.g. add a padding to the left. whatever YOU want.

    .UserReactionWrap {
    padding-left: 22px;
    }

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

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Thanks for trying my addon!

    Guests should be able to see the reaction record, but not vote.

    Did you import data from another forum?

    The icons get stacked if the user does not have an avatar/profile photo.

    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.

  • Options
    peregrineperegrine MVP
    edited September 2014

    @hgtonight

    on a new install of yaga 1.0 the problem occurs and guests can vote. as far as I can tell.

    by virtue of

    'Yaga.Reactions.Add' => 1, // Can a user click on reactions?

    drop column Yaga.Reactions.Add from your your permissions table and you can replicate issue.

    since guest role doesn't show add (it is hidden from view but still acted upon) you can't uncheck it. it has to be corrected via a sql update in code or manually.

    disable and re-enable yaga and you will see,

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

  • Options

    I used the import file provided with the download after installing the application.

    Also, thanks for the avatar info -- I will have to setup a default avatar to stop that issue!

  • Options

    @peregrine said:
    on a new install of yaga 1.0 the problem occurs and guests can vote. as far as I can tell.

    I guess it's not just me!

  • Options

    @cclubb said:
    I used the import file provided with the download after installing the application.

    Also, thanks for the avatar info -- I will have to setup a default avatar to stop that issue!

    http://vanillaforums.org/addon/vanillicon-plugin

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

  • Options
    hgtonighthgtonight ∞ · New Moderator
    edited September 2014

    Nice catch on the issue. I would think people that can comment should be able to react by default, so I made it default to that permission.

    Fixed here: https://github.com/hgtonight/Application-Yaga/commit/4772485ed26d32d7c0fd14cf64e10e21f641a93d

    Thanks @cclubb for finding this bug, and @peregrine for debugging it.

    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.

  • Options
    peregrineperegrine MVP
    edited September 2014

    that won't fix it, I don't think hgtonight.

    perhaps 0 is the best. in the about

    'Yaga.Reactions.Add' => 0, // Can a user click on reactions?

    and it will allow click to add for other roles besides guest will show up in settings page.

    if you drop the column and add

    https://github.com/hgtonight/Application-Yaga/commit/4772485ed26d32d7c0fd14cf64e10e21f641a93d

    it will just disallow settings add and make it impossible to add reactions.

    see if anyone has the same issue I see. time will tell.

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

  • Options
    hgtonighthgtonight ∞ · New Moderator

    I tested that patch on a fresh install of 2.1.3 and didn't experience the guest reacting issue.

    I will have to test it some more, I guess.

    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.

  • Options
    peregrineperegrine MVP
    edited September 2014

    maybe it just me. see if others have issues.

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

  • Options

    @hgtonight said:
    Nice catch on the issue. I would think people that can comment should be able to react by default, so I made it default to that permission.

    Fixed here: https://github.com/hgtonight/Application-Yaga/commit/4772485ed26d32d7c0fd14cf64e10e21f641a93d

    Thanks cclubb for finding this bug, and peregrine for debugging it.

    Thanks for getting on this bug so quickly!!

    However, I tried the fix and still have the same issue.

Sign In or Register to comment.