Permalink
Browse files

Patch 'Write New Articles' Bug

Write clicking an Article Container and > Write New Articles would link to a bad page because class_key would be undefined.

I call this a patch not a fix because i'm not sure why itm.classKey is empty, but it now defaults to 'Article'

Signed-off-by: JP DeVries <johnpaul.devries@gmail.com>
  • Loading branch information...
1 parent a65969a commit 3218b42b33309489f6ce12a8304cd91e01a084d3 @jpdevries committed Mar 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/components/articles/model/articles/articlescontainer.class.php
@@ -167,7 +167,7 @@ public function prepareTreeNode(array $node = array()) {
Ext.getCmp('modx-resource-tree').loadAction(
'a='+MODx.action['resource/create']
- + '&class_key='+itm.classKey
+ + '&class_key='+((itm.classKey) ? itm.classKey : 'Article')
+ '&parent='+p
+ '&template=".$template_id."'
+ (at.ctx ? '&context_key='+at.ctx : '')

0 comments on commit 3218b42

Please sign in to comment.