WordPress.org

Forums

Achievements for WordPress
"Achievement Unlocked Box" Causing odd Re-Direct Loop (33 posts)

  1. TMJ31
    Member
    Posted 2 years ago #

    I am running Achievements 3 on a Multisite network with Buddypress.

    However, the plugin is NOT network activated as of yet. It is running solely on the main buddypress community page.

    I created a simple test achievement. It was awarded simply when you Favorite an activity stream entry 1 time.

    I Published it, and then proceeded to go and favorite an activity stream entry. The next time I reloaded a page, the 'achievement unlocked' notification popped up with the icon and name of the test achievement. It correctly worked when I tried the FB/Twitter share feature (which is great!).

    However, when I went to click the blue box asking to take you to see your achievements, the page simply reloaded and the unlocked achievement box reappeared. Over and over. No matter where I clicked, it wouldn't disappear and no matter what URL on our network I typed in it always loaded with the achievement unlock box blocking the content with no way to close it.

    I was forced to set the achievement to DRAFT status as to not prevent our users from browsing the site.

    Any ideas what could be causing this?

    We are using the "BuddyPress Social" theme from WPMUDev.

    http://wordpress.org/extend/plugins/achievements/

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    > when I went to click the blue box asking to take you to see your achievements, the page simply reloaded

    Which URL does it take you to? If you open that URL in another window, does it work, or does it 404?

    By a strange coincidence, I found a similar issue when working on Achievements last night; I couldn't figure out how I caused it (and I hadn't seen it before), I wonder if it's the same. Do you know how to / are you comfortable looking at a record in the database and letting me know the value of something?

  3. TMJ31
    Member
    Posted 2 years ago #

    Yes, I can tell you the value of a database item.
    Let me know what you need (I will be out this evening, but will get it to you asap)

    In regards to your other questions:

    If you happen to be sitting on the main Activity Stream when the achievement unlock box pops up, hitting f5/reload simply reloads the Activity Stream with the box STILL there.

    If you attempt to click any other navigation items on the "white out" portion of the page behind the box, you aren't able to since the box has focus.

    If you click the "see other achievements" box you get taken to this url
    http://OURSITE.com/author/USERNAME/achievements/

    And when that page loads, you cannot see any of the content, because the unlock box loads on top of everything and once again you cannot close it nor take focus away from it.

    Nothing causes it to 404 or open in a new window. It just reloads the same url's in a neverending loop seemingly.

  4. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    > If you click the "see other achievements" box you get taken to this url
    That and everything above it is the current expected behaviour. The URL should clear the notification, but clearly not :)

    Can you look in the wp_usermeta table for this:
    meta_key = wp__dpa_notifications
    user_id = (your user ID that you get this problem with)

    Copy/paste the meta_value here. It'll look something like this:
    a:1:{i:37;s:0:"";}

  5. TMJ31
    Member
    Posted 2 years ago #

    Here you go Paul:

    a:1:{i:10577;s:0:"";}

  6. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    Ah hah. See https://github.com/paulgibbs/achievements/commit/9e8988cc532c029e4d0eab57e471877b894f12ac

    If you want, try making that code change to see if it clears the problem.

  7. TMJ31
    Member
    Posted 2 years ago #

    Made those code changes.

    Problem persists, unfortunately.

    The Achievement Unlocked box appears correctly, but any attempt to close is unsuccessful, and if you navigate to another page (by entering another URL in the site, or by clicking 'see other achievements') you are taken to the appropriate page, BUT the Unlocked box re-appears and won't go away.

  8. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    Hmm, that's unfortunate. I'll update here if and when I get any more ideas.

  9. TMJ31
    Member
    Posted 2 years ago #

    If you're interested in taking a look at our back-end to see any potential theme/plugin conflicts, just let me know and we can communicate on twitter/skype to make that happen.

    We've been looking forward to Achievements for such a long time,, it truly would take our network to the next level, it's a bummer that our site is breaking it :(

  10. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    How about..

    1) Make sure you have backups of everything.
    2) Download this https://github.com/paulgibbs/achievements/archive/master.zip
    which is the very latest dev version of achievements.
    3) Unzip, rename the directory to "achievements", and replace the version that's on your site at the moment.
    4) See if problem goes away.

  11. TMJ31
    Member
    Posted 2 years ago #

    Hi Paul,

    Thanks for the download link.

    I've done as you suggested, and I think we're making progress!

    Now the Achievement Unlock box 'goes away' if I click outside of it and I am then able to browse on the desired page normally.

    However, anytime the page is reloaded or a new page is accessed, the same Achievement Unlock box reappears. This happens indefinitely until I either set the achievement to "draft" status or deactivate the plugin.

    So the Unlock "focus" issue seems to be resolved, but it's still reappearing in an odd fashion.

    Any thoughts?
    (THANK you for your assistance)

  12. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    > Now the Achievement Unlock box 'goes away' if I click outside of it
    Yes, this is new in 3.1 (you're using a beta of 3.1).

    > it's still reappearing in an odd fashion.
    Once I can figure out how to recreate it, I'll try to fix it :)

  13. TMJ31
    Member
    Posted 2 years ago #

    Would it be advantageous to you to have an account on our network to see it for yourself? If so, I'd be happy to set you up. Just let me know.

  14. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    It's hard to know whether access to the site would be of any help in debugging. I've got another question for you:

    In the database, look in your Posts table -- may you show me all the details for ID = 10577 please? If you don't want to post it here, you can get my email from http://profiles.wordpress.org/DJPaul

  15. TMJ31
    Member
    Posted 2 years ago #

    I've sent you an email Paul.

    Thanks for the continued support.

  16. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    Thanks. Unfortunately everything looked splendid. Will think about some more, and I'll do some debugging in multisite.

  17. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    I just tried this on a clean multisite install, and everything worked perfectly. Baffled.

    Delete that usermeta key I told you to earlier, and the popup should disappear. Yes?

    Then try creating a new achievement, unlocking it, and see if the same persistent popup problem occurs>

  18. TMJ31
    Member
    Posted 2 years ago #

    I deleted the usermeta key and the popups ceased.

    Went and created a new achievement with different "event" criteria, the achievement worked and the box appears, but the persistent popup problem is STILL occurring.

  19. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    Weird. It must be something particular on your site, because I really can't recreate it. Hopefully when the plugin grows in popularity, if anyone else recreates the issue, I'm sure they'll complain about it soon :)

  20. TMJ31
    Member
    Posted 2 years ago #

    The same conclusion I came to, unfortunately :(

    I am attempting to do some testing with specific themes and plugins disabled to see if the problem is there.

    Hopefully I'll isolate the issue, it would be a massive setback to not be able to use this great plugin you've created.

    Thanks again for your help Paul.

  21. TMJ31
    Member
    Posted 2 years ago #

    One final update Paul:

    I attempted reverting the Buddypress Default theme and the issue seems to have disappeared.

    Unfortunately, we're really committed to the theme we use currently, so I guess it's a matter of looking into the coding of the theme and trying to root out whatever the issue may be.

    I should have thought of this straight away, but anyway, there you have it.

  22. David Hunt
    Member
    Posted 2 years ago #

    Hi,

    I just tried out Achievements and experienced the same problems as initially described by TMJ31:

    Achievement box pops up, but attempting to click the blue button, or manually typing in a different site URL in the browser address bar, does not make the box go away.

    I can provide debugging info if you like, to help find the common thread between TMJ31's setup and mine!

    Best,

    David

  23. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    Can you look through this thread and let me know if any of your information is the same as TMJ31's?

    Also, let me know the theme you are using and any other plugins or config tweaks.

  24. David Hunt
    Member
    Posted 2 years ago #

    I suddenly realised that the achievements page is a sub-page of the author page ... I had disabled author archives with WordPress SEO by Yoast. This, in effect, redirects any URL with /author/ in it back to the homepage.

    I re-enabled the archives and, voila, the blue button worked and the redirect loop was no more. So, TMJ31, maybe you have also disabled author archives?

    The bad news is, I quite liked having author archives disabled, since my site isn't about authors, it's about members. (So I'm about to read up more about BP integration with Achievements.)

  25. TMJ31
    Member
    Posted 2 years ago #

    Paul & David:

    Been away for much of the weekend, I see there is some new info here that may help the issue!

    I will be posting tomorrow with feedback and results.

  26. TMJ31
    Member
    Posted 2 years ago #

    Ok, here we go:

    I've looked through our plugins and we are not using WordPress SEO, and as far as I can TELL, no other plugins that would disable author archives.

    So, I am going to try updating the plugin to 3.1 today and see if it has any effect.

  27. pmcvicker
    Member
    Posted 2 years ago #

    Just want to add that I've experienced the same persistent pop-up on my development site. The pop-up can be cleared, but every time a user visits a new page they're immediately presented with the last pop-up they received. The pop-up cannot be cleared by clicking outside the pop-up when visiting a buddypress page such as a member profile or activity however. Visiting the page for that specific achievement by clicking on its featured image will clear the pop-up from reoccurring. Let me know if any further information would be helpful for addressing this.

  28. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    Any clues, wisdom, insights, or rants are more than welcome to figure out how I can recreate this. Unless I can get SSH or FTP access to a test server and user account that has this problem?

  29. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 2 years ago #

    pmcvicker

    > Visiting the page for that specific achievement by clicking on its featured image will clear the pop-up from reoccurring.

    This is exactly how it's meant to work. The popup is only permanently removed after visiting your author archive page, or the achievement's page itself.

  30. gamechangerchi
    Member
    Posted 2 years ago #

    Hi Paul,

    I have created a testing ground on a mock site that experiences many, if not all, the issues explained above.

    I have also ftp access to this mock site. I am going to send you a message at paul@byotos.com but wanted to post here first as a heads up

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Achievements for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.