Link in activity feed redirecting to homepage instead of user's store

Hi!

@Michael Bissett
I'm pinging you here because you're one of the few who are familiar with the issue. The activity feed of users used to display a link to the respective store a product was posted on, now it shows a link to the homepage instead: http://i.imgur.com/V95jDWu.png

I think it's highly likely to be related to the fact that Marketpress (and not TT MP Frontend Admin, as we thought) is blocking non super-admins to have access to their stores -I've granted super-admin privileges to the user shown in the screenshot above, so I could post that product. This alone seems to have broke the previous system I had in place, that allowed users to create as many separate stores as they intended to. Let's say an user had created 3 stores, each for a different purpose: at his/her activity feed, one would see the name of the product as a link, and the name of the store to which the product was posted, as a link too.

I've opened a thread on the MP issue, but I think I've been forgotten, as it's been almost a week since my last post and nobody answered me back:
https://premium.wpmudev.org/forums/topic/access-to-store-and-user-role-in-marketpress-2962#post-1002730

As always: my credentials were sent with Adam's name on it around 4 weeks ago.

Just to be clear: I'm well aware that there's a ton of stuff in my site that requires custom dev, but I really don't think the problem reported here would be one of those, because, like I said, it's something that was working just fine, and Marketpress itself is the root of a directly related issue (actually, this whole thing might be caused by this MP block, as described).

Thank you very much for your attention, and for helping me countless times with my issues. :slight_smile:

  • Michael Bissett

    Hey @Gabriel,

    Your site's brought on a avalanche of issues, so do forgive me for not quite recalling the cause of this one. :slight_smile:

    That said:

    The activity feed of users used to display a link to the respective store a product was posted on, now it shows a link to the homepage instead: http://i.imgur.com/V95jDWu.png

    Since it used to do this, what changed in the meantime? You mentioned MarketPress, and downgrading it to 2.9.6.2, did this only occur after doing that?

    Break it down for me, please, and we'll be able to sort this more smoothly. :slight_smile:

    Kind Regards,
    Michael

  • Wheel of Commerce

    First of all, thanks for answering so quickly. :slight_smile:

    This started after that guy from Ultimate Auction logged into the site to fix something wrong with his plugin, then messed everything up. About MP, I didn't downgrade it, I just never updated it, since my theme's dev told me MP versions above mine aren't compatible with the theme (he's working on that) -actually, I did updated it one time by accident, and in fact it broke everything. So yeah, basically what happened is this: before the Ultimate Auction guy logged in, everything was wonderful, with unicorns flying around in rainbows and all of that, then he logged in and it all went straight to hell -I know this sounds utterly dumb, but that's pretty much what happened.

    Like I said, this whole mess really seems to have a direct relatin with MP not allowing non super-admins to post products. From that thread I've mentioned:

    When I go to https://www.wheelofcommerce.com/wp-admin/edit.php?post_type=product (standard back end MP page to check a user's products) logged in as johanschneider, the message I see is: "You do not have sufficient permissions to access this page.". When I go to https://www.wheelofcommerce.com/store-admin (that front end page), the message I see is: "You are not authorized to access this page.". When I'm logged in my regular super admin account though, I can access everything -front and back ends. The exact same thing happens when I grant johanschneider super-admin access. This confirms that the issue is in fact MP -since I can't access its standard back end page as a regular user.

    Something worth mentioning: before the incident, users had separate admin areas for each of their stores, and the slug structure was /subsitename/store-admin ("subsitename" being the name of the store). Now, even though users can still create different stores, they can only access one store admin area, at /store-admin. When they try accessing /subsitename/store-admin, they get a Page not found message (even if I give the user super-admin privileges).

    Just remembering: TT Marketpress Frontend Admin does create the front end interface that allows users to access their Products section from MP (though from the frontend, obviously), but it doesn't determine which roles have access to it -MP does that part.

    Thanks again, man. I know this one isn't a big deal, compared to my previous issue, that prevented me to access any part of my site, but if I can get this fixed, to look nice in the promo video, that'd be great. :slight_smile:

  • Michael Bissett

    Hey @Gabriel,

    In looking at this further:

    The activity feed of users used to display a link to the respective store a product was posted on, now it shows a link to the homepage instead: http://i.imgur.com/V95jDWu.png

    By default, that would be the correct link for BuddyPress to give, as that's supposed to be a link to the site that the post was posted on, which in this case, would be your main site.

    I'm not seeing that there's an entry in the BuddyPress codex on how to make it do something else, and I'm not seeing where we set it to point somewhere else before?

    I do see the code that we inserted into the bp-custom.php in prior times, but nothing that's changing the link like what you've described.

    Ultimately, though, it would be something that'd require a code adjustment, rather than it being something related to admin permissions.

    Kind Regards,
    Michael

  • Wheel of Commerce

    Fortunately, I was lucky enough to find a screenshot that shows what I'm saying (the red arrow is marking the profile rating, so just ignore it, you can see what I'm talking about at the bottom of the screenshot): http://i.imgur.com/bmH6D8l.png

    If I recall it correctly, Vinod also helped me with that -if my memory isn't failling me here, it was you, Vinod and Patrick.

    Thanks again. :slight_smile:

  • Michael Bissett

    Hey @Gabriel,

    Hmm... I'm not seeing how that shows what you're saying, to be perfectly honest with you, the only thing I'm seeing different about that entry now is that it says "wrote a new item", instead of what it used to be, that being "added a new product". That only appears to affect his past product, though, I just created a test product in Johan Schneider's store, you'll see that on your activity feed now, that it points to his site.

    The making of the entry read as "added a new product" was the only thing that Vinod's code dealt with before.

    The link you mentioned would be pointing to the user's site, one way or another.

    As I mentioned before, I'm not seeing that there's an entry in the BuddyPress codex on how to make it go to a different link, I did try looking into whether that was possible before posting.

    Kind Regards,
    Michael

  • Wheel of Commerce

    On that screenshot from my last post, you'll see at the bottom: "johanschneider added a new product, on the store Johan Schneider's store". Like I said, I was lucky to find that screenshot in one of my folders; it's old, from before the incident with the UA guy, so it shows things the way they were. Now, instead of getting a "[username] added a new product on the store [name of user's store at which the product was added]", the link to the user's store is being replaced by a link to the homepage.

    Here's another screenshot I've found, I'm presuming this one is from the time when you guys were helping me to create just what I'm talking about, as you see posts in the activity feed with [name of the store], but the last one is with the link to the homepage: http://i.imgur.com/uUsYPmH.png

    Thanks once more. :slight_smile:

  • Michael Bissett

    Hey @Gabriel,

    Now, instead of getting a "[username] added a new product on the store [name of user's store at which the product was added]", the link to the user's store is being replaced by a link to the homepage.

    It does still say that:

    http://screencast.com/t/R5sO8GRh40

    But that still doesn't change what I said above:

    I do see the code that we inserted into the bp-custom.php in prior times, but nothing that's changing the link like what you've described.

    This is the thread where the changes Vinod (and others) had created had been posted:

    https://premium.wpmudev.org/forums/topic/automatically-post-products-added-as-activity-update-on-buddypress

    The code to get this working would need to be developed separately, as mentioned earlier.

    Kind Regards,
    Michael

  • Wheel of Commerce

    At least to record the video, the link functionality itself doesn't matter (though that's something I'll obviously have to get fixed before launching the site). Nevertheless, I do need the name of the store to be displayed correctly, wich it isn't, as shown here: http://i.imgur.com/V95jDWu.png . If you want, you can check it with the exact same account from that screenshot -I've sent those credentials with Jude's name yesterday. I've also tested it with johanschneider and had the same result: http://i.imgur.com/U4BJ10D.png

    Thanks again. :slight_smile:

  • Michael Bissett

    Hey @Gabriel,

    If the product's being posted on your main site (as it's name is "Wheel of Commerce"), then that's what's going to be given as the store name, as that is the name of the site after all. :slight_smile:

    As Johan posted that product over on your main site:

    http://www.wheelofcommerce.com/store/products/chair

    Then the store name coming up as "Wheel of Commerce" is to be expected. :slight_smile:

    If it's posted over on another site, though, then the name of that site will be given instead, as shown in the following screenshot:

    http://screencast.com/t/TIT5LBj6v

    Kind Regards,
    Michael

  • Michael Bissett

    Hey @Gabriel,

    As explained on Kasia's live chat today, I was going into the Dashboard for a user's site, and creating a product from there, whereas you were using a frontend page that existed on your main site (hence the posting of the product on your store, rather than the user's store).

    I also saw a mention of the store admin pages on the subsites being different from what they used to be, but I see that you've got the front end admin page links sorted out now, good job! :slight_smile:

    Kind Regards,
    Michael

  • Wheel of Commerce

    [UPDATE]

    I forgot to mention: that rating system is generated by a plugin called Multi Rating. The shortcode that creates that is in the 16th line of product-style1.php, inside /wp-content/themes/pro3-child/templates
    <?php echo do_shortcode('[mr_rating_form]'); ?>

    Kasia gave me the CSS to align it inside the title box:

    .rating-form.mr-shortcode  h4,
    .rating-form.mr-shortcode .description {display: none !important;}
    
    .rating-form.mr-shortcode {float: right; margin-top: -10px;}
    .mr-star-rating-select i, .mr-star-rating-select span {font-size: 15px;}
    
    .rating-form.mr-shortcode {
      margin: -5px 0 0;
    }
    
    .rating-form.mr-shortcode > form {
      margin: -5px 0 0;
    }
    
    p.rating-item.mr {
        margin-bottom: 0;
    }
    
    .rating-form.mr-shortcode {
        margin: 0;
    }

    Bottom line being: it was working just fine, vertically aligned in the title box, with the 5 stars above it, now it isn't. As far as I'm aware of, this happened after I changed the store-admin page, from /subsitename/test-frontend-admin-page/, back to the way it was (/subsitename/store-admin).

    Thanks. :slight_smile:

  • Wheel of Commerce

    Okay, since I've been trying to figure this one out for some days now, I had already opened a thread about it. I've pinged Kasia there, as she is the one who figured out how to get the stars from Multi Rating to be displayed when I first installed the plugin and all its shortcode was showing was the Submit Rating button, with no stars, which is precisely the issue now, but if you have any ideas (and have time for it, of course), please contribute there. This will probably help, as you and Tyler are the only ones who have access to my site through FTP.

    Here's the thread:
    https://premium.wpmudev.org/forums/topic/new-blog-templates-appears-to-be-partially-broken#post-1006321

    Thanks. :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.