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: textchanges won’t stick while publisher is active

Status Resolved
Add-on / Version Publisher 2.6.3
Severity
EE Version 3.5.11

Matthias Ballmann

Aug 28, 2017

hi brian,

we ran into an issue where…

a) text changes to any textfield entries in any channel won’t stick while publisher is active.
b) and/or text is completely deleted in those text fiels when publisher was inactive and is activated (again).

this seems to be an issue with all text fields (default ee as well as wygwam).
however: creating new entries while publisher is active and saving text to these fields seem to work and changes are sticking.

at first we tought it maybe an issue with the new ee 3.5.11 but after writing with ellislab’s derek jones and he took a look at our installation he wrote: “Correct, if it works with Publisher disabled, and does not when it is enabled, then you have confirmed that it is an issue with that add-on. I confirm the behavior on your indicated entry. When I try to save content, the field is emptied.”

what can be the issue here?

#1

BoldMinded (Brian)

Have you tried replicating it in a clean environment with only Publisher installed? Or tried replicating it on demo.boldmimded.com? I can’t replicate the issue anywhere, so you’ll have to setup the clean EE environment with only Publisher installed to replicate it and to show it is a Publisher issue, or uninstall your addons one at a time until it starts working again to find a potential addon conflict.

#2

BoldMinded (Brian)

Matthias, I just edited this entry and it seemed to save the Title and Introtext fields just fine. You’ll have to be more specific about the issue you’re having, including what fields are not saving and what entry you’re editing. Taking a small video of you repeating the error will help a lot.

https://www.dropbox.com/s/ki3jbb5tn4px8gk/Screenshot 2017-08-28 14.01.45.png?dl=0

#3

Matthias Ballmann

yes, it works with new entries but editing older won’t. try this one:

/admin.php?/cp/publish/edit/entry/130

#4

BoldMinded (Brian)

That was an existing entry that I saved.

What do you my mean by “older”? Is there any significance to the date? How long has Publisher been installed on this site? Specifically what was the first version # you installed?

#5

Matthias Ballmann

sorry for being unspecific. the entry you edited was just created today by ellislab’s support and is editable as every new entry I would create now. latest entries #134, #135 and #136 are all editable.

the problem are older entries created prior to 25/8/2017 (entry #133 and older).

I installed publisher last week with your help because I ran into error messages and you provided me with the last beta (ticket #1530). so the first version was 2.6.0 or 2.6.2 that I installed last week. after that I installed the lite-version you gave me via dropbox (because of an misunderstanding) and now the site runs the latest 2.6.3.

#6

BoldMinded (Brian)

Have you tried clearing your cache?

https://www.dropbox.com/s/lhf5fnd5384d0ob/Screenshot 2017-08-28 15.48.08.png?dl=0

#7

Matthias Ballmann

yes, several times. does it something have to mean that even I deactivated drafts the default “save” (and “save & close”) buttons read…

SAVE & PREVIEW (and SAVE & CLOSE)?

#8

BoldMinded (Brian)

No, thats just the javascript changing the button text.

Do you have the original zip file you downloaded when you first purchased Publisher? If so put those files back into place and see if the entry saving works.

#9

Matthias Ballmann

no, I deleted that zip file since I ran into the problems described under #5. shall I download the version from my boldminded-account?

#10

BoldMinded (Brian)

Comment has been marked private.

#11

Matthias Ballmann

how shall I install it the best? delete the current one via system or manually? is there a way to keep all the phrases I created?

#12

BoldMinded (Brian)

Just replace the files, don’t uninstall anything.

#13

BoldMinded (Brian)

Matthias, I just edited entry #93 /admin.php?/cp/publish/edit/entry/93, and Projektname, Kurzer Projektname, and Introtext field saved fine. I also see that you’re still running Publisher 2.6.3. At this point I’m not sure what else I can do b/c I’m unable to replicate it, and I tried to replicate it in your environment based on the information you provided.

Please use a tool to record a video of your screen and share a short screencast of you reproducing the bug.

#14

Gregory Maher

Hi Brian and Matthias, Just a quick note that I’m experiencing a very similar issue. I am unable to save content in existing entries in a Publisher MSM site running ExpressionEngine 3.5.9 and Publisher 2.6.3.

Brian, you’ve worked on this particular site before and I’m happy to share details (and/or screenshare) to show you the exact issue.

Thanks in advance!

Greg

#15

BoldMinded (Brian)

Gregory, can you test something for me. Replace the getCustomField method in the Services/ChannelField.php file with the one below. Its the last method in that file. Let me know if it starts working again.

private function getCustomField($name, $return = 'field_label', $flipped = false)
    {
        $mapping = $flipped ? 'nameToField' : 'columnToField';
        $cacheKeyPrefix = 'customFields/'. $this->siteId;

        if ($field = $this->requestCache->get($cacheKeyPrefix .'/'. $mapping .'/'. $name)) {
            return $field[$return];
        }

        $customFields = array();
        /** @var \CI_DB_result $query */
        ee()->db->_reset_select();
        $query = ee()->db->get('channel_fields');

        foreach ($query->result_array() as $row) {
            $customFields[$cacheKeyPrefix .'/columnToField/field_id_'. $row['field_id']] = $row;
            $customFields[$cacheKeyPrefix .'/nameToField/'. $row['field_name']] = $row;

            $this->requestCache->set($cacheKeyPrefix .'/columnToField/field_id_'. $row['field_id'], $row);
            $this->requestCache->set($cacheKeyPrefix .'/nameToField/'. $row['field_name'], $row);
        }

        if (isset($customFields[$cacheKeyPrefix .'/'. $mapping .'/'. $name][$return])) {
            return $customFields[$cacheKeyPrefix .'/'. $mapping .'/'. $name][$return];
        }

        return null;
    }
#16

Gregory Maher

Comment has been marked private.

#17

Gregory Maher

Hi Brian, Trying that produces the same issue as the video demonstrated above. Any other thoughts would be helpful. If there’s anything else I can provide certainly let me know. I believe you have a login already for the site if that’s helpful.

Thanks in advance!

Greg

#18

BoldMinded (Brian)

I actually probably don’t have your login anymore if it was entered into a ticket (its deleted when tickets are closed) or its buried deep in my email archive.

Lets try one more change. Service/Cache/Cache.php, replace the get() method with this.

public function get($key)
    {
        if (REQ == 'CP' || $this->setting->get('cache_enabled') === false) {
            return false;
        }

        return $this->driver->get($this->getKey($key));
    }

These two replacements are basically undoing what I thought would be an improvement, but is the only thing I can think of since the 2.6.2 release that would have anything to do with content loading/display.

#19

Gregory Maher

Hi Brian, Thanks for another try…unfortunately this didn’t work either. What’s odd is that all other content seems to stay true to it’s language except for what I’m editing. Is there another update further back that might have adjusted something here? Would me creating a new ticket and including access information be helpful? If so, can you provide an IP address if you’d like sFTP access?

Thanks!

Greg

#20

BoldMinded (Brian)

No, don’t create a new ticket yet. I think this is something I need to replicate locally to fix it.

I can’t really see in the video, but when you switch languages in the entry edit page, is there a value for publisher_status? or is it &publisher;_status= with no value?

#21

Gregory Maher

On initial load of the edit form there are no query strings in the URL. When the language is switched both a lang_id and publisher_status have values. The lang_id seems to be correct and publisher_status=open

#22

BoldMinded (Brian)

When you added the 2.6.3 files, did you click the Update button on the add-on page?

#23

BoldMinded (Brian)

I was experiencing some weird issues when I realized I had forgotten to run the updates in my new dev environment. Once I ran the updates the issues cleared up.

#24

BoldMinded (Brian)

So did running the updates and clearing caches fix it?

#25

BoldMinded (Brian)

Matthias, I think your issue is you have the Drafts disabled, but its set to use Draft as the default save status, so every time it saves it is saving the draft, as evident in the DB:

https://www.dropbox.com/s/scbtekkm83hh19x/Screenshot 2017-08-28 20.40.49.png?dl=0

For now, I think if you set the Default save status setting to Open it should fix the issue.

https://www.dropbox.com/s/kmoe1ri2xvshbz7/Screenshot 2017-08-28 20.43.15.png?dl=0

I’ll add something in the future to make sure when drafts are disabled, that the default save status has to be set to open.

#26

Gregory Maher

Hi Brian, No, running the update and clearing the cache didn’t do the trick. I’m going to doublecheck the advice you gave to Matthias to make sure that’s not our issue…but I don’t think that’s the case.

Greg

#27

Gregory Maher

As I thought our issue does not seem to be Draft/Status related. Would the fact that the Language “flags” on the Edit Listing page are not showing maybe give a clue? I believe you mentioned a patch/fix for this previously but I did not try it. Did you wrap the fix into the current files? Because it’s still not working. I know it’s a long-shot but thought I’d mention it.

Thanks for the continued support, Brian!

Greg

#28

BoldMinded (Brian)

The flags were never added to the EE3 version, but the setting was left in on accident. I never liked that option b/c flags are not good representations of language/localization (in most cases its pretty clear, but not for all languages/countries).

Go ahead and make a new ticket adding the CP login info, and FTP info if you’re comfortable with that. I’ll take a look on Tuesday.

#29

BoldMinded (Brian)

Greg, it looks like you have the Status option disabled too, so at first glance it does seem like a similar issue that Matthias is experiencing. Have you queried the exp_publisher_titles and exp_publisher_data tables for the entry_id that you’re testing to make sure it only has 1 row for each language and status combination. If for some reason it added a row with the incorrect status or language due to a bug, it may be querying an entirely different row when displaying the entry, thus it would be saving the data correctly now, but an orphaned/incorrect row is what is found as the first result in the query.

#30

Matthias Ballmann

hi brian and gregory,

sorry for not answering but I went to bed last night (we are 6–9 hours later here in germany 😊 – and I didn’t get the emails from the thread, starting with #12 “Just replace the files, don’t uninstall anything.“ no back in the office I see that quite a conversation envolved about that issue.

I’ll try it with the drafts enabled and give you feedback on that later. thank you for the hint!

#31

Gregory Maher

Hi Matthias and Brian, I believe my issue is different so I’m going to open a new ticket. So, moving forward you guys can continue here re: the Drafts topic.

Thanks!

Greg

#32

Matthias Ballmann

hi brian,

it seems, enableing the drafts resolved the issues and we can save textchanges now. I also deleted all channel-layouts (different issue from #1532) and we will work on with this installation.

thank both of you for your help!

#33

BoldMinded (Brian)

Glad to hear its working! I made a change for the next release to prevent this from happening. From now on if you set Disable Drafts to “yes” it will also force the default save and default view status settings to “yes”.

Login to reply