I have CP links like:
http://localhost:8888/ee2.8.0/system/index.php?D=cp&S=0&C=addons_modules&M=show_module_cp&module=freeform&method=edit_form&form_id=6Which works when pasted directly in EE 2.8 and normally in EE 2.7.x and below.
The automatic running of EE.cp.cleanUrl on all links via:
EE.cp.cleanUrls = function() {
$('a').attr('href', EE.cp.cleanUrl);
$('form').attr('action', EE.cp.cleanUrl);
};Turns my links into these, which throw “Disallowed Key Characters.” errors.
http://localhost:8888/ee2.8.0/system/index.php?/cp?S=0&C=addons_modules&M=show_module_cp&module=freeform&method=entries&form_id=6Is there some way to opt out of having urls auto-reformatted until we are ready to make our addons segment compatible in the CP?
Hey sorry, I wasn’t getting email updates for this topic for some reason and just saw it towards the top while digging through the 2.8.2 stuff.
There was some reason we had to do a lot of these manually. Lemme check into it to make sure what it was and i’ll get back to you.
Hey Wes,
Thinking on this I am remembering loosely that the error building the CP links like:
ee()->config->item('cp_url').'?S='.$sis that our end users weren’t consistent on using the CP url and some were using site.com/admin.php while others were using /system/index.php. Meaning same set of end users, same website, even with user education, some would still go to one link and some the other.
Thus when building ajax links, it was at times failing for some of our customers because they too would set the CP url to one thing then use the other option and cause JS errors because the JS domain wasn’t set.
In the end it was easier to build our own urls manually using the file they were currently visiting (admin.php vs /system/index.php) and route all links and ajax urls in kind.
There is a sidelong issue with trying to send form variables VIA $_GET to a url that already has $_GET variables on it. It doesn’t work properly unless all of the variables are in the form, hence all of the CP $_GET vars have to be written in as hidden inputs. (This situation usually occurs with filtering and pagination on MCP pages for addons.)
Thus when building ajax links, it was at times failing for some of our customers because they too would set the CP url to one thing then use the other option and cause JS errors because the JS domain wasn’t set. In the end it was easier to build our own urls manually using the file they were currently visiting (admin.php vs /system/index.php) and route all links and ajax urls in kind.
Maybe I’m misunderstanding here, but that’s exactly what BASE does:
define('BASE', SELF.'?S='.ee()->session->session_id().'&D=cp');SELF is defined in the index.php or admin.php being used:
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.