Skip to content
Permalink
Browse files

Fix an issue when process/action values are CamelCased (#14676)

  • Loading branch information...
JoshuaLuckers authored and opengeek committed Aug 21, 2019
1 parent 5643cf7 commit ea9b0e804a8c0499d67678aede233a1cd0664b6a
Showing with 2 additions and 2 deletions.
  1. +2 −2 manager/assets/modext/core/modx.component.js
@@ -321,7 +321,7 @@ Ext.extend(MODx.toolbar.ActionButtons,Ext.Toolbar,{
Ext.applyIf(itm.params,o.baseParams);
var url;

var process = itm.process.substr(itm.process.lastIndexOf('/') + 1);
var process = itm.process.substr(itm.process.lastIndexOf('/') + 1).toLowerCase();
if ((process === 'create' || process === 'duplicate' || itm.reload) && res.object.id) {
itm.params.id = res.object.id;
if (MODx.request.parent) { itm.params.parent = MODx.request.parent; }
@@ -333,7 +333,7 @@ Ext.extend(MODx.toolbar.ActionButtons,Ext.Toolbar,{
action = o.actions.edit;
} else {
// Else assume we want the 'update' controller
action = itm.process.replace('create', 'update');
action = itm.process.replace('create', 'update').replace('Create', 'Update');
}
MODx.loadPage(action, url);

0 comments on commit ea9b0e8

Please sign in to comment.
You can’t perform that action at this time.