1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Can't Fix Post Ratings Incompatibility

Discussion in 'Showcase Resolved Bug Reports' started by The Sandman, Oct 26, 2013.

  1. The Sandman

    The Sandman Member

    I'm not sure whether this is a bug in Showcase, but the following error is being generated when certain members like a Showcase item and then click the Post Ratings Given link (to see a summary of the ratings they've given others):

    Code:
    Error Info
    ErrorException: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The first argument should be either a string or an integer - library/Dark/PostRating/ControllerPublic/Account.php:73
    Generated By: Syndol, 5 minutes ago
    Stack Trace
    #0 [internal function]: XenForo_Application::handlePhpError(5, Array)
    #1 /home/adminx/public_html/library/Dark/PostRating/ControllerPublic/Account.php(73): array_key_exists()
    #2 /home/adminx/public_html/library/XenForo/FrontController.php(337): Dark_PostRating_ControllerPublic_Account->actionRatingsGiven(Object(XenForo_RouteMatch))
    #3 /home/adminx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch()
    #4 /home/adminx/public_html/index.php(13): XenForo_FrontController->run()
    #5 {main}
    Request State
    array(3) {
      ["url"] => string(43) "http://adminextra.com/account/ratings-given"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(0) {
      }
    }
    
     
  2. Bob

    Bob Developer Staff Member

    Post ratings is not integrated anywhere within showcase, nor does that error above have anything "showcase" related in it. The liking of a Showcase Item is only done on the ITEM page itself. Post Ratings is a THREAD related addon, so maybe you are talking about a Discussion Thread (NOT A SHOWCASE ITEM) being liked?
     
  3. The Sandman

    The Sandman Member

    It's definitely happening when a particular user likes the Showcase entry itself, not a post in the discussion. After liking the Showcase item, the error appears when you click the "Ratings you've given" link. It's probably not related to Post Ratings after all - I thought it was because the "Ratings you've given" link is part of Post Ratings. But there is no standard XenForo link for "Likes you've given" so I don't know if the error would exist if there was such a link. I can't test that.
     
  4. Bob

    Bob Developer Staff Member

    Where is this "Ratings you've given" on a showcase item? There is no such link on a showcase item.
     
  5. The Sandman

    The Sandman Member

    No, that link is located on the Alerts Preference Page. It's meant to list all of the post ratings you've given. For this particular user (I've logged onto his account to test it), once he likes the showcase item and then clicks the link it throws the error. I know it's weird.
     
  6. Bob

    Bob Developer Staff Member

    Do you have the Resource Manager? If so, create a resource, have that user like that resource and then click on the "Ratings you've given". The RM and SC both do their "likes" the same way (as do many addons).
     
  7. The Sandman

    The Sandman Member

    No Resource Manager (yet).

    The weird thing is it only happens with one user that I know of so far. Other users in the same usergroup don't seem to have the issue.
     
  8. The Sandman

    The Sandman Member

    If it helps, here's the line of code that seems to be throwing the error:
    Code:
    if(array_key_exists($ratingUser['rating'], $ratings)){
     
  9. The Sandman

    The Sandman Member

    BTW, I also asked about this in the Post Ratings add-on discussion - no reply yet.
     
  10. Bob

    Bob Developer Staff Member

    That error is happening in the Post Ratings addon (which I don't have).
     
  11. Bob

    Bob Developer Staff Member

    The user is Syndol. Have that user make 1 actual post rating in a discussion thread), THEN see if the link works, then like a showcase item and see if it happens. If I had the addon, I could TS.
     
  12. The Sandman

    The Sandman Member

    He has lots of post ratings he's given. They don't cause an error. Only when he's liked a showcase item does the error come up.
     
  13. Bob

    Bob Developer Staff Member

    ok, well, I am at a loss. I can't HELP if I don't have a specific error related to showcase. That error message above is 100% contained to Post Ratings. Please start a convo on xf.com with Luke, yourself and I so that the 3 of us can figure out what might be happening with Syndol on your site. Its obviously a user issue of some sort.
     
  14. Bob

    Bob Developer Staff Member

    I marked this as "Can't Fix" as its an issue with Lukes Addon, not with showcase.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.