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: Cannot delete Matrix rows when saving as Published

Status Resolved
Add-on / Version Publisher
Severity Critical
EE Version 31

Timothy Kelty

Jul 19, 2013

If I delete a Matrix row and save as published, the row remains when the page is loaded.

What I have seen happen, seemingly inconsistently, is the ability to delete a row, save as draft, and have it stick when viewing draft. Then sometimes I’m able to delete the same row, save as published, and it sticks as published. However, I can’t seem to do it consistently.

Curiously, it doesn’t seem to be for ALL Matrix fields.

Hopefully you still have the “Lipp” site I’ve sent you still running.
To recreate, edit the “Stanley” Case Study (entry id 1912), remove a row from the “Main Gallery with Thumbnails” and save as published.

When you edit the entry again, the row will remain. However, you’ll notice if you delete the row from the “Years” Matrix field, it works fine.

#1

BoldMinded (Brian)

Are you using Publisher 1.0.3? (sorry I forget)

#2

BoldMinded (Brian)

nevermind, that was supposed to be fixed in 1.0.2

#3

Timothy Kelty

Sorry that one slipped past me. I’ll update to 1.0.3 regardless.

#4

BoldMinded (Brian)

1.0.3 isn’t out yet, but I’ve sent the build to a couple people.

#5

Timothy Kelty

Oh, gotcha. Yeah I just have 1.0.2 with the following hacks from you:

Homepage query string vendor/ee/third_party/publisher/libraries/Publisher/Publisher_session.php http://boldminded.com/support/ticket/551

Browser langauge detection vendor/ee/third_party/publisher/libraries/Publisher/Publisher_session.php

#6

BoldMinded (Brian)

I do have the lipp site running, but only at home. I’ll give it another look this weekend. I can’t replicate the behavior in my local sandbox… rows seem to be deleting just fine, regardless of what the current and save statuses are set to :/

#7

Timothy Kelty

Yeah, like I said, it didn’t happen on all fields, just some. :(

#8

BoldMinded (Brian)

I wonder if this is what you are seeing. If I have 3 rows in an entry, view draft and save as draft and delete one row at a time it works fine. But if I delete the first and only row and save it as a draft, then view the draft again, all 3 rows return. The database is correct in this case, there are no draft rows. I think what it is doing is loading the open/published rows since it thinks the field is empty. This is part of the fallback display option. If content isn’t found, it loads the open/published content in its place, assuming you’ll want to edit that content and save it as a draft.

#9

Timothy Kelty

I don’t think so, this was one with 8 rows, and I’m just deleting one, saving as Published, and go back and view published and there are still 8.

#10

BoldMinded (Brian)

Is there a Playa field in this Matrix field per chance?

#11

Timothy Kelty

There is, but to test I also removed all the cells except for a textarea, and had the same results.

#12

BoldMinded (Brian)

What happens if you turn off the CP Display Fallback option?

#13

Timothy Kelty

In Publisher? Are you referring to “Sync drafts” or another setting?

#14

Timothy Kelty

Setting Sync drafts to no had no effect, if that’s the setting you were referring to.

#15

BoldMinded (Brian)

Oh, sorry. Its a hidden value. Open up config.php and look for display_fallback. Set it to no and see if that does anything.

#16

Timothy Kelty

Nope, no change when set to no :(

#17

BoldMinded (Brian)

Well that sucks 😊

I’ll take a look at it this weekend with the instructions you provided and see what turns up.

#18

BoldMinded (Brian)

I’m having trouble replicating this. Are you viewing the entry draft version, then saving to published? Or viewing the published version and saving it published? Or viewing published and saving it as draft?

#19

Timothy Kelty

“viewing the published version and saving it published”.

With the dump I sent you: * Open up the “Stanley” case study * view published * delete a row from “Main Gallery with Thumbnails” (reducing it from 8 rows to 7) * save as published * edit the entry again, viewing published * You should still see 8 rows, the row was not deleted

#20

BoldMinded (Brian)

I just emailed a new build. I noticed on one of my own sites yesterday that Matrix rows were doubling up on the FE, and with this build I’m not able to replicate the issue you’re seeing, so I’m hoping it fixes it in the CP too (it uses the same hook, so its the same code in both places).

#21

Timothy Kelty

That seemed to do it, at least for the example I was testing!

I’ll close for now. If anything comes back up I’ll reopen. Thanks!

Login to reply