Be sure to checkout our newest add-on, Speedy — Advanced Caching for ExpressionEngine.

Compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field (it's in the works).

Ticket: Save / Preview Error: The page you requested was not found.

Status Resolved
Add-on / Version Publisher Lite 2.11.2 build cbd0133b
Severity
EE Version 5.2.6

John White

Sep 27, 2019

Hello,

I’m new to Publisher Lite. Not positive if templating correctly. I apologize for my ignorance.

A site with 4 subdomains (EE with MSM). Only using Publisher lite for Drafts & Workflow. When I Save Draft & Preview the returned page is the generic EE..

Error
The page you requested was not found.

Preview Template Code

<div class="row">
            {exp:channel:entries channel='portfolio' status='open|featured|{publisher:entry_status}' url_title='{segment_3}' limit='1'}
            <div class="col-lg-4 col-md-6" id="sticky-sidebar">
                    <div class="portfolio-details-content">
                        ...
                    </div>
            </div>
            {/exp:channel:entries}
</div>

 

 

#1

BoldMinded (Brian)

Sep 27, 2019

Hi, John. Can you provide a video or screenshots of what you’re referring to? I can think of 3 different ways to preview something, so knowing exactly what you’re talking about will help.

#2

John White

Sep 27, 2019

Hi Brian,

When I edit an entry then Select Save Draft & Preview ...
http://mhwcompanies.com/images/Pub_lite_save_preview_error-01.jpg

Returns the EE Error The page you requested was not found…
http://mhwcompanies.com/images/Pub_lite_save_preview_error-02.jpg

#3

BoldMinded (Brian)

Sep 27, 2019

That is most likely due to a template/routing issue on the front-end. Did you define your Preview Templates in Publisher’s settings if you are not using Pages or Structure?

#4

John White

Sep 27, 2019

I see the error now. it’s not adding the subdomain to the address.

Instead of http://subdomain.maindomain.com/template it’s only taking on the main domain ie http://maindomain.com/template/

Main domain has no templates. Should I make various preview templates and move them to the main domain?

#5

BoldMinded (Brian)

Sep 27, 2019

I’m actually not sure how to solve that one. It’s worth a shot though.

#6

John White

Oct 01, 2019

That didn’t work. Couldn’t pull the various subdomains entries into the main domain.

Basically, the main domain is a landing page. Each Subdomain(4) has different templates and structures. I’ve figured out through way too much time coding templates and setting/removing templates in Publisher Lite…

I can remove all Publisher templates and use EE’s built-in preview so the client can save drafts and preview changes before publishing.

IE… edit entry > Publisher Lite Save & preview > Close preview (only returns Company Homepage) > EE Preview > Shows Preview template with correct draft > close that EE preview > Save as: Published (dropdown) > Finally save the edited entry to show live.

That’s just way too many steps.  I just need a simple save as draft for workflow purposes. Wasted most of my weekend on this. Can you enlighten me on where the base_url/uri hooks are in the Publisher Lite system? I’d like to compare it with the EE Preview code to see if I can get this to work. I literally just need the subdomains to addend to the beginning of the Save & Preview URL to preview with the proper templates.

Also for MSM support it would be nice to have the “Preview Template” selection process show which Site/Subdomain template is being selected. I have 4 different “news/detail”, “embeds/featured” or “product/detail” templates and it’s a crapshoot if I’ve selected the proper one. (Not that it’s working in this instance, yet)

#7

BoldMinded (Brian)

Oct 01, 2019

John, I’m sorry you’re having trouble with this, but due to the EE Conference I’ve been really busy, and it starts tomorrow, so its going to be at least a week before I’ll be able to dedicate time to looking into this. MSM with EE has always been a tricky/difficult beast. The first place I’d look into for this is the legacy/libraries/models/publisher_draft_preview.php->save() function.

#8

BoldMinded (Brian)

Oct 01, 2019

Have you tried disabling Publisher’s preview and just using EE’s native preview?

#9

John White

Oct 09, 2019

Hi Brian,

EE’s Native preview works. Updates in realtime.

If I hit PubLite Save Draft & Preview it does not preview the draft but saves it.

If I click A more recent draft is available and hit the EE Native Preview I get a PHP Notice and Warning…
Notice
Use of undefined constant BASE - assumed ‘BASE’
ee/legacy/core/URI.php, line 333
• Severity: E_NOTICE

Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/libraries/Functions.php, line 393
• Severity: E_WARNING

Still need to figure out a way to make this work.  The site is done besides the client loading their final content. They’re starting to get pissed with me as I’ve fought with this for weeks now.

#10

John White

Oct 09, 2019

Before I purchase and attempt - would Publisher Domain Control be any use here?

#11

BoldMinded (Brian)

Oct 09, 2019

PDC is more for the front-end. Did you debug the Service/Url/Url.php file at line 276 in the getSiteUrl() method to see if it is finding the correct base URL?

#12

John White

Oct 11, 2019

I’m honestly at a complete loss.
After countless hours of playing with the Url.php ( my php knowledge is limited ). Somethings broke, somethings enacted a change, but nothing rectified the situation.

So I’ve…
1. Uninstalled PubLite.
Set all MSM subdomain sites to reflect proper subdomain in EE.  Settings > URL and Path Settings > Default base URL > subdomain.domain.com

2. Tested EE Default Preview > Works.

3. Reinstalled PubLite

4. Edit Entry > PubLite > Save draft & preview > (the url displays correctly! -  Mini Win) but the PubLite Preview returns subdomain.domain.com refused to connect.
if I click on the PubLite Preview link the page opens with a correct draft preview.

I can continue to update the draft > draft & preview > refresh tab with previous preview > it updates
but the save draft & preview continues to Refused to Connect.

it’s like right there…but Im so over my head and spent at this point. Any help would be appreciated.

#13

BoldMinded (Brian)

Oct 11, 2019

Can you capture a video of the whole issue so I can see exactly what you are seeing? Also if you add FTP to your dev site I can take a look. Make sure the Publisher directory is writable and the ftp access works.

#14

John White

Oct 14, 2019

Comment has been marked private.

#15

BoldMinded (Brian)

Oct 14, 2019

Based on the video, the URL in the preview modal is correct, b/c you open it in a new browser tab and it displays correctly in the browser? If the URL in the modal (the one that contains ?publisher_draft=X and publisher_key=X) always works in a new tab, regardless of which MSM site you’re trying to preview, then it may be a browser security thing or something?

Is the Construction site the main/default site? Your video didn’t appear to include an example of what happens when you’re previewing a page from a different MSM site.

#16

BoldMinded (Brian)

Nov 09, 2019

Closing this b/c I don’t believe this is a Publisher bug, everything appeared to be working correctly. Also have not heard a response in nearly 2 months.

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.