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: URLs in CP interface incorrect

Status Resolved
Add-on / Version Publisher 1.5.4
Severity Trivial
EE Version 2.9.0

Peter Lewis

Oct 13, 2014

Hi, the session ID used in the internal Control Panel links are incorrect - once clicked on (or when form data submitted) it causes redirect to login page.

I was running an older version and had though it may have been fixed in v1.5.0 as it mentions CP URLs and cookies in the change log, but alas it still is an issue on v1.5.4.

Looking at Publisher_helper_cp.php there’s this chunk of code from line 235:

//just to prevent any errors
            if (isset(ee()->session) AND isset(ee()->session->sdata))
            {
                // EE 2.6+
                if (isset(ee()->session->sdata['fingerprint']))
                {
                    $session_id = ee()->session->sdata['fingerprint'];
                }
                // EE < 2.6
                else
                {                     $sessi>session->sdata['session_id'];
                }
            }
            else
            {
                $session_id = 0;
            }

I did a var_dump of the contents of ee()->session->sdata and the fingerprint came out with a completely different reference to what all my Control Panel URLs were using.  So I changed line 241 (which references the “fingerprint” element of the array) and replaced it with “session_id” (so both conditions for EE 2.6+ and EE < 2.6 were identical).  This then resolves the issue.

I’m using Session ID only for the Control Panel Session Type if that has any relevance.

#1

BoldMinded (Brian)

Thanks for the report, Peter. I’ll take another look at this.

#2

Peter Lewis

Hi, FYI - just had to re-apply this fix to v1.5.9 (EE v2.9.0) as still an issue for me generating incorrect dropdown menu links (replicated issue on 3 different servers).

#3

BoldMinded (Brian)

Peter, I just uploaded 1.6.1 to Devot:ee, try it out and let me know if it fixes your issue.

Login to reply