Bug #22975 Bug Fixed

Duplicate Session ID on Menu Manager links created from `cp_custom_menu` hook

Version: 3.5.1 Reporter: Jace Richardson

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

Note: I did not see any changelog items in 3.5.2 that address this.

When using the ‘Cookies and Session ID’ setting for CP Session Type, EE appends a duplicate Session ID into the link.

We are using the recommended method of using the CP/URL service as follows:

public function cp_custom_menu($menu)
{
    if (REQ != 'CP') return true;

    $url = ee('CP/URL')->make('addons/settings/myaddon/mymethod');
    $menu->addItem('Add-on Name', $url);
}

Also, the docs for cp_custom_menu specify to create your URL like so:

$menu->addItem('Title', ee('CP/URL')->make('/myaddon'));

Which renders a URL to :

admin.php?/cp/myaddon

Which is not the correct URL for third-party add-ons in the CP (missing ‘/addons/settings’).

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases