MarketPress update still causes permalink failures

Just FYI, when I updated a client site to MarketPress 2.8.9, all the permalinks for other custom post types stopped working, and were 404 links for a few days until we were told what was happening and I reset the Permalinks settings.

This happened all the time a few months back when I was first setting up the site, when every time I changed a setting in MarketPress the permalinks for other types would stop working until I went into the overall settings for Permalinks.

Just thought someone should know this is still happening, and that things like this happening is why I don't like to have auto-updates enabled :wink:

  • atouchofsummer

    Hi Patrick!

    Honestly, this permalinks issue with custom post types has never been a problem on any site I've ever built, past or present, not until I started using MarketPress and the one time I tested out Directory or Classifieds.

    I've built sites with custom post types that worked without a hitch, and with several different CPT management plugins, and only in the past year, the 2-3 times when I've introduced MarketPress into such a site, did this problem raise its head.

    I have never had custom post type permalinks disappear like this in any other situation, never even heard this before or from other folks I've worked with, so please provide some links to this known issue that don't involve MarketPress?

  • Aaron

    I've never heard of this exact thing happening. However is is very common for other plugins to register their post types or permalinks at the wrong time, which could cause this issue. They must be registered before or in the 'init' hook, as permalink flushes according to the codex should only be in the init hook.

    Just the same, I'm going to delay the upgrade flush till way later in the init hook, hopefully that will help. This is commited for MP2.9 so hopefully it will not happen again on your next upgrade.

  • atouchofsummer

    @Patrick, I hate it when that happens, too :slight_smile: I just wanted to see if I could dig deeper into it if it is a wider spread issue, but like I said, this is literally the very first time it's happened for me.

    The fact that it never happened with MarketPress alone for me on other sites was what made it such a surprise on this project. And while I typically enjoy surprises and techie challenges both, tech challenges that I can't figure out how to eventually bend before my will do so annoy me :wink:

    @Aaron, cool. And I have a test site with this same setup if you want someone to test your beta when it's ready :slight_smile:

    If it helps, on this client site, the CPT is built into the theme I used, but this collision also happened with Custom Post Type UI, which I used for some of my other sites that use CPTs.

    And no, Custom Press wasn't an option for that project at the time, as MarketPress was a very late stage addition... a change in direction, and the CPTs had already been in place on the live site by then. Not sure if it's something for a future switchover or not, but who knows.

  • atouchofsummer

    @Karen, the current workaround is to go to Settings > Permalinks and that's it.

    Seriously, just visiting the Permalinks settings page seems to kick the settings in the head and remember the CPT permalinks.

    I had to do it all the time when first setting up MarketPress on this particular site, because I was still playing with layouts and setup, but after things were set, I never needed to play the permalinks game again, until I upgraded MP and that quirk popped up again.

    Hopefully Aaron's fix in the next version means it won't ever pop up again! :slight_smile:

  • Karen


    I am glad it was that easy for you! I am a non-techie and hate the challenges. I seem to have a whole raft of issues now (WPMU Dev widgets not loading, but non-WPMU ones are). Kicking the permalinks hasn't fixed it.

    Ari gave me some code to get the errors to show and now my site is littered with error messages showing (which I guess was the idea) - but it is gobble-de-gook and I don't know how to get rid of it.

    Frankly I just want to get on with the website (it was looking ok) not go back to the drawing board and have to figure out how to code!

  • atouchofsummer

    @Aaron, I hope you see this even though the topic is resolved. I was reading up on flushing rewrites just to get a handle on it in my head, and I came across this in the WP Codex:

    Important: Flushing the rewrite rules is an expensive operation, there are tutorials and examples that suggest executing it on the 'init' hook. This is bad practice. Instead you should flush rewrite rules on the activation hook of a plugin, or when you know that the rewrite rules need to be changed ( e.g. the addition of a new taxonomy or post type in your code ).

    Wonder if that's what's causing this whole mess in the first place?

  • atouchofsummer

    I could set up a new test site with the same configuration I had before and try it out, but I did post here about the permalinks magic trick issue back maybe 3-4 months ago. I had no problems duplicating it at the time, LOL.

    I do still have the issues with the extra post info and post meta being displayed on product pages, but I've managed to concoct a few workarounds for that as best I could, and no one but me seems to notice or really care it's there. It's the one obstacle preventing me from updating that site to a full HTML5 based theme, but it's not something that needs to be done at the moment.

    So even with the few quirks unique to my setups that drive the ocd unix admin side of me crazy, my client loves how the MP catalog displays his products, and if he's happy I really can't complain too much :slight_smile:

  • atouchofsummer

    @Patrick Cohen

    it's something specific to the Genesis framework, and with the proliferation of new Genesis HTML5 child themes, I consider the extra meta problem to be nearly impossible to resolve without help from stronger coders than I... it's only going to grow, and no one at Studio Press nor here at WPMU seems interested in pinpointing the problem, even though it seems to be a Genesis thing (it happened in Genesis 1.9, and there were workarounds able to yank that info out of there... but not anymore).

    The addition of HTML5 support in Genesis 2.0 and the introduction of auto-generated custom post type archives seems to have made the problem damned near unbearable when either MarketPress, Directory and I think Classifieds are in use. One test I did, the problem did not show up when I tested just CustomPress by itself, which only caused more confusion on my end.

    The extra meta did not appear at all in non-Genesis HTML5 themes, and even an expert Genesis consultant (he even helped me write a Genesis plugin) thinks the problem is with the themes, but the fact that the problem shows up in all the Studio Press themes including the sample child theme to me indicates that the problem starts somewhere inside the Genesis framework itself.

    I used to have a test site with MarketPress and Genesis 2.0 set up as an example to show people, but I blew that up a week or two ago to play with some new WP 3.8 interactions. If any WPMU Dev coders want a sandbox site with Genesis to play around on this with, my previous offer to set up such a site still stands.

    I've been playing with WordPress since 2005-6, and with Genesis since the day it first came out as a framework... I've never seen anything quite like this, and being stuck in my own exploration in figuring it out while still not having a way to resolve it annoys me... like an itch at the back of my brain :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.