global categories and tags are not displaying

hello. somehow, I lost my global categories in marketpress. I have checked the database and all of them are still there but they are all showing up as 0 in the counts column. How can I restore the correct counts of all of them for the different products without doing a restore of the database. I don't have a restore available. I didn't notice this problem soon enough and all old restores are gone. I have about 860 global products. I hope there is another way than having to manually figure out each individual product's category and somehow manually add it on the database.

  • Michael Bissett

    Hey Leslie, Michael here! :slight_smile:

    This'd be something I'd want to have a deeper look at first, could you please send in the following via our secure contact form:

    - Mark to my attention, the subject line should contain only: ATTN: Michael Bissett
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress network admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include hosting control panel access details (login address, username & password)
    -- cPanel's usually the control panel used for this, but your provider may use something else; I'll need this to have a look at your site's database, preferably via phpMyAdmin
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    https://premium.wpmudev.org/contact/

    Kind Regards,
    Michael

  • Michael Bissett

    Hey Leslie,

    The email in question was the one you'd replied to, where I asked about creating SFTP details for the live site (which I've taken care of). :slight_smile:

    After looking into this further, I'm seeing that global categories were indeed present on your live site, but the hiccup here was the NOBLOGREDIRECT define:

    define('NOBLOGREDIRECT', 'http://ecraft.wpengine.com');

    When I tried viewing the global marketplace pages, I found myself being redirected to that homepage, and that turned out to be the culprit (something that this thread explored before).

    To preserve that define, and also allow for the marketplace pages to display properly, I've changed the code there to this:

    $uri_request = $_SERVER['REQUEST_URI'];
    
    if (strpos($uri_request,'marketplace') === false) {
    	define( 'NOBLOGREDIRECT', 'http://ecraftandshare.com/' );
    }

    And am now able to access global category pages, like this one:

    http://ecraftandshare.com/marketplace/categories/homedecor/

    And global tag pages, like this one:

    http://ecraftandshare.com/marketplace/tags/cards/

    Can you confirm the same on your end, please? :slight_smile:

    Kind Regards,
    Michael

  • Leslie

    Hi Michael, I am working on the staging site now. The live site's categories are working well. Thank you for the help with that. The staging site still has problems though. I tried the solution up above on the staging site but the url for categories using the new, current marketplace seems to be different from the old 2.9.6 that is still on my live site. On the newest version of marketpress the addresses for categories seem to be /global-products/category/garden-art instead of the old way like so: /marketplace/category/garden-art Is that correct? So....the first problem is as follows: on my staging site using the current marketpress version, I put in this shortcode [mp_global_categories_list] to get a list of categories. When I click on it on the site, I get to the list of categories. Good so far. When I click on one of the categories, I get redirected to the same page again with the categories listed and this is what the address looks like in the browser. http://ecraft.staging.wpengine.com/global-products/category/garden-art/ I noticed it says global-products instead of marketplace. Figured it was because of the new version of marketplace.

    I tried using the code you gave before for the live site and changing it like so then adding to my wp-config file: Here's how I changed it:
    $uri_request = $_SERVER['REQUEST_URI'];

    if (strpos($uri_request,'global-products') === false) {
    define( 'NOBLOGREDIRECT', 'http://ecraft.staging.wpengine.com/' );
    }
    It had no effect on the problems above unfortunately.

    finally, another problem with categories that is likely related to this whole issue is: if I use this shortcode [mp_list_global_products limit= "12" order= "DESC" category= "christmas" ] I would expect to see christmas items displayed but I am seeing random products instead. The shortcode is working because I am seeing only 12 products listed as it states in the shortcode but not the category of Christmas items so the category part of the shortcode is not working. Wondering if I changed the code incorrectly and that is why it is not working as it did on the live site. Any help you can give would be super appreciated. thanks ( You may still have the credentials for the staging site that I sent previously and can still use those if you need to.)

  • Michael Bissett

    Hey Leslie,

    On the newest version of MarketPress, the addresses for categories seem to be:

    /global-products/category/garden-art

    Instead of the old way like so:

    /marketplace/category/garden-art

    Is that correct?

    On my site, I'm finding it to be /global-store (as far as the autogenerated page is concerned), but yes, in your staging site, that would be the URL.

    Did notice that your global store page used the /store page, I've changed it to that /global-products page of yours.

    Next up:

    On my staging site using the current marketpress version, I put in this shortcode:

    [mp_global_categories_list]

    To get a list of categories. When I click on it on the site, I get to the list of categories. Good so far.

    When I click on one of the categories, I get redirected to the same page again with the categories listed and this is what the address looks like in the browser:

    http://ecraft.staging.wpengine.com/global-products/category/garden-art/

    This would be due to an outstanding bug in Upfront (I see you're using the Panino theme here), which I do not have an ETA on the fix for presently. For the time being, I would advise the use of an alternative theme, until this gets sorted out.

    Last one:

    Finally, another problem with categories that is likely related to this whole issue is:

    If I use this shortcode:

    [mp_list_global_products limit= "12" order= "DESC" category= "christmas" ]

    I would expect to see christmas items displayed but I am seeing random products instead.

    The shortcode is working because I am seeing only 12 products listed as it states in the shortcode, but not the category of Christmas items, so the category part of the shortcode is not working.

    Wondering if I changed the code incorrectly and that is why it is not working as it did on the live site?

    I'm seeing that Christmas items are coming up on the test page I created:

    http://ecraft.staging.wpengine.com/wpmu-dev-test-page/

    With the content looking like this:

    http://screencast.com/t/QxbuofUQWTfu

    What's it looking like on your end?

    Also, while I didn't see a difference over on my end, for styling sake, shortcodes usually have the parameter values right after the = sign:

    [mp_list_global_products limit="12" order="DESC" category="christmas"]

    Noticed there was a space in your example.

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.