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: Publisher messed up my site page templates

Status Resolved
Add-on / Version Publisher Lite 2.6.1
Severity
EE Version 3.5.9

Zhan Chen

Aug 07, 2017

Description: After I changed the default Default save status, my site templates are messed up. I cannot save changes to my site pages. The status is published (open), but the changes just cannot be published. My site page was switched to another template automatically. I tried to change the template and saved 100 times but it didn’t let me save the changes. Then, I turned off Publisher, my site is broken - I got a blank page. But then I was able to switch the template and save my changes. But like I said, I got a blank page. I had to turn on Publisher again, then the changes I made and saved were gone!!!!

Detailed steps to reproduce the issue:
1. Tried to make changes to the site
2. Changed the default save status to “Open” (Published)
3. Cannot save changes to my pages, cannot switch templates, my templates was changed automatically by the system
4. Turned off Publisher
5. Site is broken

 

 

#1

BoldMinded (Brian)

Turn on your debugging so you can see what template it is trying to load.

https://www.dropbox.com/s/80b8v74wwqon840/Screenshot 2017-08-07 12.27.42.png?dl=0

Publisher doesn’t change templates. It looks like its just not maybe saving the template correctly to the entry. You’re not using the latest version, which includes some fixes around this functionality. Grab 2.6.2 from your downloads.

#2

BoldMinded (Brian)

Actually, when checking this to verify what you reported I noticed something wasn’t working right. Grab the latest copy of Structure, and use the Publisher build in my next message.

#3

BoldMinded (Brian)

Comment has been marked private.

#4

Zhan Chen

Hello - we have updated both Structure and Publisher to the latest version, but it didn’t solve the problem. Not sure what’s missing here.

Please take another look and advice. Thanks!

#5

BoldMinded (Brian)

Make sure this row appears in your exp_extensions table:

https://www.dropbox.com/s/bafjuf3m0pjdwym/Screenshot 2017-08-10 11.10.11.png?dl=0

Make sure the legacy/libraries/hooks/Publisher_structure_hooks.php file contains this:

https://www.dropbox.com/s/1b2bsyteolodqjh/Screenshot 2017-08-10 11.11.24.png?dl=0

And also make sure its getting called. So add var_dump($settings); die at the end of that function call and reload the publish page.

var_dump($settings); die;
return $settings;
#6

Zhan Chen

/Users/zhanchen/Downloads/Screen Shot 2017-08-10 at 5.52.22 PM.png - after adding that row..

#7

BoldMinded (Brian)

That row in the table should already exist. Did you check to see if it existed before adding the new row? Also your screenshot didn’t come through. It needs to be at a public url or edit the ticket and upload more images.

#8

Zhan Chen

Hello - I don’t think this is going to work. I know we had some issues when we first installed the add-on.

If you could look at the code that would be helpful. Let me know if that’s possible,

Thanks,

#9

BoldMinded (Brian)

Did you re-save the entry/entries you were having trouble with and make sure the correct template is assigned in the Structure tab?

I don’t know what you mean take a look at the code. I can’t look at the code on your site, and I was able to confirm the latest build I sent contained the fix to the issue. I can replicate it locally, and I just edited “The Ship” entry on your site to save a draft that used a different template than “statesroom-detail” and it saved the template setting in Structure correctly.

#10

BoldMinded (Brian)

I’m 99.9% confident that the latest build fixes the issue you were seeing, which is that the assigned template, parent id, url, and hide from nav options were being saved correctly, but not properly displayed when you edit an entry again after saving it. I’m suggesting that you take a look at whatever entries you’re having trouble with and make sure that those fields in the Structure tab are saving and then re-populating with the expected data again. It sounded like the original issue was the wrong template was getting assigned to an entry after the initial save because when you re-loaded the entry in the CP it was not selecting the correct template, thus when you saved it again it saved the wrong template.

Also, if the channel is managed by Structure, you don’t need to assign a custom preview template. It should show the preview using the template assigned to that entry. It may actually be making things more confusing by assigning the preview template to a Structure managed channel.

https://www.dropbox.com/s/qtz4a7wudaqfm8x/Screenshot 2017-08-11 13.52.10.png?dl=0

#11

BoldMinded (Brian)

Closing this ticket b/c its been nearly a month with no response and I’m unable to replicate the issue.

If you are still having issues feel free to re-open the ticket, and provide more detailed information on the bug you are experiencing.

Login to reply