Redirection page with Classifieds on BP Profile

This is not so much a bug, but a question about how the Classified plugin behaves.

With BuddyPress, on the user profile page, when you click the Classifieds link it takes you correctly to the user's classified ads, but only after briefly pausing on a blank HTML page that reads, "You are being redirected. Please wait." It seems to have an image, that image is always a broken link, but I know it is some kind loader gif.

So my question is this, why is there a redirection page in the first place when are just navigating parts of BP user profile, and why do I have the bad luck of getting a broken image (on a page I'd rather not have anyhow)?

Comments 28

Unfortunately I can't access that page without logging in. Do you have an account I could use to login with, or if you have our dashboard plugin installed, you can grant support access by visiting Dashboard > support > support access

To find out what the image is, can you hit stop on the browser when the redirection page appears.

Then hover over the image and right click, then click copy image URL, or inspect element, you should then be able to see the path to where the image should be, it might give you a clue.

Can you switch to the default twentyfourteen theme temporarily and see if this redirect page still appears.

So my question is this, why is there a redirection page in the first place when are just navigating parts of BP user profile,

We have to unfortunately use this as a workaround, so that we are able to set up some stuff before we decide what to display and then redirect the user to the actual page, using javascript.

We know that this is not the best way and we are reviewing this. I'll mark this as a feature request, nevertheless. We are figuring how to replace this with a more intuitive alternative. However, I don't have an ETA on this.

why do I have the bad luck of getting a broken image (on a page I'd rather not have anyhow)?

This, is a classic Catch-22 situation. The page starts redirecting before the loader gif is loaded. The loading of the gif is cancelled by the browser! (You can see this in the network console, if you use chrome, by checking preserve log.)

I guess we can pre-load the image or remove it altogether. I'll consult the developer so we can take the best step ahead.

I'm looking into the issue now. This is not happening in my installation.
Did you change/update something before this started to happen?
What WP version are you running? Is it related to WP 4.0 update?

I have no idea if it is related to 4.0. I had some issues already (noted at the top of the thread), but they compounded recently. I suspect it all has to do with the strange workaround you have in place for this redirection. Your redirection as it stands causes other problems too, I have another support topic open that is a variation on this one (and probably caused by how this is handled). That one can be found here: https://premium.wpmudev.org/forums/topic/redirect-to-user-activity-page-when-clicking-seller-link

I realize this thread started out with just navigating inside the profile, but the issue is bigger than that. Can the redirection page just be removed altogether? If you managed it within the profile, can it be cleaned up when linking in from the ad itself?

For clarification, the javascript redirection is not hacking or messing with your site. You don't need to be worried about other functionality being broken.
It just take any call to the naked slug ../calssifieds/ and, since there is nothing to show, it just redirects to a default content according to the context.
For instance, it redirect to ../classifieds/my-classifieds/ if the context is the logged user profile, or to ../classifieds/all/ if the context is a public profile.

I know this is a bit annoying, I'm not sure why this implementation was necessary. I bet there is a very good reason.

Our suggested workarounds/fixes here and in the other threads are just to avoid calling to ../classifieds/, changing the links dynamically to point directly to the corresponding target. i.e. ../classifieds/all/.

In this new version, I only changed the default template for singe classifieds view (you can also override it in your theme). Now, it will use the 'hooked' method to define the author link. So, the code provided by @Hoang Ngo here will work also for this view. (it was working fine for taxonomy views).

Please let me know if you find any other place that needs to be changed and I'll assist you with the modification. :slight_smile:

One question this, you've given me a customized plugin, making this no longer upgrade-friendly. What files did you change and how should I go about putting them into my theme so they survive when a new version of the plugin is released?

@Jose sorry for the late reply on this. I upgraded to the latest release and it reminded that I still have an issue to address on this.

When I try to make more upgrade friendly (though I recognize the need to modify the buddypress.php file), when I put single-classifieds.php into my them folder I get a fatal error:

Fatal error: Using $this when not in object context in /home/teatrade/public_html/dev.prometheusfire.me/newsline-development/wp-content/themes/act-newsline/single-classifieds.php on line 12

It's coming from the global post section right at the beginning of the template file. It works fine as part of the plugin, but the same file, dropped into the child theme, breaks. Removing line 12 breaks the whole thing and returns a whitescreen.

Sorry to interject, but I was working with a problem of this nature - the "messy" refresh page, and @Jose pushed out a new update to the classified and membership plug-ins that fixed it for me.The classified pages all load more quickly and elegantly for me now.

Just for clarification, I pushed the improvements for consideration of the lead developer.
If there are no issue, which I think is the case, it would be included in the next release. The current release do not contains the fix.

How do you rate me?

Thank you for rating your experience!

We’re thrilled to hear you had a great experience with . Would you like to leave a comment about your experience?
Thanks for voting on your experience with , we’d love to get some feedback please.
Ohh no! We’re really sorry to hear you didn’t have a pleasant experience with , we’re always looking at how we can improve and would appreciate you provide some further feedback here please.
Type your feedback here

it's great that you had a positive one. Based on your experience in this ticket would you please be kind enough to rate us externally on: