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: “Has Aprroval” links do not include system dir in URL

Status Resolved
Add-on / Version Publisher Lite 2.5.2
Severity
EE Version 3.5.10

Luke Jennings

Jul 03, 2017

Hi,

Running on PHP 7.0.15

Description: When a draft is pending approval, links to that draft are incorrect, primarily they do not include the system dir in the URL.

Detailed steps to reproduce the issue:
1. User A (submitter) submits draft entry for approval (to user B (approver))

2. User B receives email containing links using the {link} and {preview_url} tags

3. {link} returns eg “http://site.com/index.php?/cp/publish/edit/entry/5081&S=984a3c5b2fad0e27d62a311ab477df6a” and therefore sends the user to the front-end 404 page, when it seems it should be “http://site.com/system_dir/index.php?/cp/publish/edit/entry/5081&S=984a3c5b2fad0e27d62a311ab477df6a”

4. {preview_url} in the email is simply returning “array” - this is less of an issue for us immediately, because the client rarely uses this functionality.

5. Any user (A or B) accessing the entry through the control panel edit > channel method is shown the “has-approval” modal, which is also behaving in the same way as {link} above (i.e. is returning “http://site_url.com/index.php….” rather than “http://site_url.com/cp_url/index.php….”)

All the link hrefs we’re seeing are absolute links, not relative, and all cp_url and site_url values seem to be correct and are behaving normally with regards to the rest of the site and back-end.

Thanks in advance,

fingo

#1

BoldMinded (Brian)

What is the value of your site_index setting?

#2

Luke Jennings

index_page is blank so site_index is identical to site_url: “http://www.site.com/”

#3

BoldMinded (Brian)

Are you changing the default path to CP? Does it work when it’s set to the default admin.php? If you’re trying not to use the default admin.php why not just change that file name instead of putting it into a sub directory?

#4

BoldMinded (Brian)

Another reason to see if it works when the CP url is set to the default admin.php is to confirm that it is in fact an issue when the CP url is different. If it doesn’t work when its set to the default /admin.php then it means the issue lies elsewhere.

#5

BoldMinded (Brian)

In the Service/ControlPanel.php file line 112 change site_url to cp_url and see if that fixes it.

$url = ee()->config->slash_item('cp_url') . $url;

https://www.dropbox.com/s/ympxqkrqu67xhly/Screenshot 2017-07-06 07.41.23.png?dl=0

#6

BoldMinded (Brian)

Closing this ticket b/c this fix will be included in the next release.

Login to reply