Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Existing entries saved directly to published not updating categories

Status Resolved
Add-on / Version Publisher 2.6.4
Severity
EE Version 3.5.10

Jeremy Jackson

Oct 24, 2017

Description:
I’m running into a bug where the entry categories are not updating on existing entries saved directly to published. If I create an entry from scratch and save it directly to published the categories save fine. I’m seeing this behavior with the categories tab only, all fields in the regular publish/content tab are updating correctly.

If I look at the published version of the entry my updated category shows up within the entry detail view. But if I look at the list view, the entry will have the old categories.

If I then save the entry as a draft and then save as published the updated category is saved.

I have Default save status and Default view status both set to Open. I have Sync Draft set to Yes


Detailed steps to reproduce the issue:
1. Create an entry and save it as published.
2. Then reopen it and add/or change a category and save it as published.

Expected results:
I’d expect that on saving the entry as published that the new category would also be saved.

#1

BoldMinded (Brian)

Hi, Jeremy. Is this something you can reproduce on demo.boldminded.com?

#2

Jeremy Jackson

Hi Brian,

Sadly no I can’t, the demo site functions as I would expect it to.

Would a SQL query log of the save be helpful?

#3

BoldMinded (Brian)

I won’t be able to tell much from the query log b/c it doesn’t show what is making the query. If I were you I’d try un-installing all other add-ons you have locally to see if it saves categories as expected. Or un-install them 1 at a time until the problem goes away, then maybe it’ll reveal a potential add-on conflict? Make a backup of your local DB before doing any of this.

#4

BoldMinded (Brian)

Comment has been marked private.

#5

Jeremy Jackson

Hi Brian,

I tried the above build as well as the 2.7.0 update, no luck. I also updated all my add-ons, no luck. Then back out as many add-ons as I could, no luck.

The odd behavior is if I save the entry as a draft, the

exp_category_posts

table will update, but it’s not updating on a publish save. Is it possible that the the category update method just isn’t firing for some reason on the publish save? What’s the intended flow for saving a draft vs published entry? I’d expect for the draft save to not update the category.

#6

BoldMinded (Brian)

Saving as a draft does update categories. The exp_publisher_category_posts table saves those assignments.

Have you tried to see if you can replicate the issue on demo.boldminded.com?

#7

Jeremy Jackson

I can half recreate it on the demo site.

Saving an entry as draft will update the category being used on the front-end. I updated kalitas-traitor-of-ghet to have a category of red on a draft and blue on published. It’s showing up as red on the front-end.

But I’m unable to recreate my bug on entries saved as published. Those are working as expected on the demo site.

#8

BoldMinded (Brian)

I see what the problem is, and apparently this has been an issue since Publisher’s inception, but no one has noticed it before. It’ll be a few days before I can get this one fixed.

#9

BoldMinded (Brian)

Jeremy, what is the URL that you’re using to display the entries and what parameters do you have in your channel:entries tag?

#10

BoldMinded (Brian)

Comment has been marked private.

#11

Jeremy Jackson

Hi Brian,

In this latest build, submitting an entry as published still doesn’t update the category.

However saving an entry as a draft now updates the category from the published entry version.

Can you give me an example of what you mean by “URL that you’re using to display the entries and what parameters do you have in your channel:entries tag”? Is this what you’re looking for?

{exp:channel:entries channel="carousels" dynamic="no" orderby="date" sort="desc" limit="1"}

I have a bunch of different ways I’m pulling in the data. But this is 100% an issue with saving to the DB.

#12

BoldMinded (Brian)

Everything I’ve experienced in testing is that its saving to the database just fine, its the display on the front end that is incorrect. The issue is that saving as draft overrides the published/open assigned category in the exp_category_posts table, which is what EE is looking at when querying entries, not exp_publisher_category_posts (which is where the correct draft and open values are saved). The build I sent uses the url, e.g. foo/category/bar or foo/C1 to find the correct category assignments for the entries to be displayed on the page from exp_publisher_category_posts.

#13

Jeremy Jackson

Hi Brian,

Honestly, I’m not that worried about the Draft saving issue. What concerns me is the categories not saving for me on published saves. I realize this might be a tricky one to troubleshoot because we can’t recreate it on the demo build. But, are there any debug statements I can try to get to the bottom of things on my end?

#14

BoldMinded (Brian)

The next step would be for you to replicate it locally, either by creating a new EE install with just Publisher, or un-installing each add-on 1 at a time until the issue goes away, then it may reveal a conflict with another add-on. Backup your db before you start that process.

#15

BoldMinded (Brian)

Basically we need to be 100% sure its a Publisher issue, or know which add-on it is conflicting with before aimlessly debugging.

#16

BoldMinded (Brian)

Jeremy, just checking in. Are there any settings you’ve changed in Publisher? E.g. is the channel you’re saving the entry in ignored by Publisher by chance?

Login to reply