I've recently seen a new bug appear on a site running WP e-commerce. New products (or certain existing products) get stuck as 'drafts'. Once they are marked as draft clicking 'publish' does not do any good, and the only way to make the products publicly accessible is by directly editing the entry in the MySQL database.

UPDATED
Further investigation shows that this is not an wp-ecommerce problem - it affects all posts.

Switching to twentyten theme fixes the problem, so clearly the inability to publish must lie somewhere in the custom theme I'm using. Seeing as it's my own theme, I guess I'm to blame ;-)

Error reporting throws up a mention of an incorrectly called register_script() function, however I don't think this is what's causing the problem, as it's not in my code.

Difficult to isolate problem. Its likely that (if not a setting within wp-ecommerce) that another plugin or recently added (?) piece of code may be interfering with the save_post function, somehow overwriting the publish status with draft regardless of user intent. What have you done to try and solve this thus far? Try disabling all plugins and re-testing, then enabling one plugin one-by-one to rule out plugin conflicts and whether the issue lay with the wp-ecommerce plugin itself.
–
userabuserOct 13 '12 at 4:09

Hi @userabuser. Disabling all plugins apart from wp-ecommerce itself had no effect unfortunately. I'm not seeing any php errors either, so I'm a bit flummoxed as to where to start.
–
fred2Oct 15 '12 at 18:53

3 Answers
3

You probably have some custom functions in your themes functions.php Add a return; on top of this file. If the problem is solved: Move it below the first function. Proceed this way until you've found the function that is causing the problem.

If this doesn't work: Go and do the same for one template file after each other until you found the file that is causing the issue.

In that case your error lays with wp-ecommerce itself as you've ruled out any via process of elimination.

The last thing I would suggest you do, is switch from your current theme to the default WordPress theme (still ensuring that all plugins except wp-ecommerce are disabled) and if the problem still persists then its definitely wp-ecommerce.

We can assume this even more so because the default theme (if never altered before) will provide the best test conditions for this scenario.

i.e. no functions.php alternations etc have been made by the user
that could possibly interfere with the plugin in question and since no
other plugins are installed whilst running this test then we know who
the problem is).

After that, if the problem persists you need to seek help from wp-ecommerce or hire a WP professional to take a look at it for you because it sounds like physical look-and-see access is going to be needed to troubleshoot this one properly unless you can provide any further information to debug.

You can try putting your WP installation into debug mode by editing your wp-config.php file and setting WP_DEBUG to true and see if any error notices are being thrown that indicate as to what the cause may be.

Thanks again. Wordpress is 3.4.2. See my updates to the question above. It does seem to be connected to my own custom theme. WP_DEBUG does not seem to indicate an obvious error in the code. I'm able to debug the code myself - main reason for posting was to see if anybody had an idea where to look in the absence of any php error reports.
–
fred2Oct 15 '12 at 21:21

Is it possible that you have accidentally changed your user role from Editor to Contributor -- perhaps in your functions.php file (which is why it might only happen on your custom theme)?

Contributors roles can only save draft for new posts and can't publish. You might like to check that your didn't change anything in your custom theme so that if user can't manage options (for example), then they can't save / publish a posts.