Forums / Extensions / The reordering of the blocks doesn't work fine by "drag and drop" - eZ FLow (2.3.0)

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

The reordering of the blocks doesn't work fine by "drag and drop" - eZ FLow (2.3.0)

Author Message

Israel Martín

Monday 16 May 2011 4:34:19 am

I can't change the order of the blocks in an attribute of the type "layout" (if you do it with the arrows works fine).

In the console appear this message: "regular expression too complex" (./extension/ezflow/design/standard/javascript/blocktools.js line 396)

The code is this:
if( name.match(/([\a-z]+)+_([\d]+)\[([\d]+)\]\[([\d]+)\]/) ) {
name = name.replace( /([\a-z]+)+_([\d]+)\[([\d]+)\]\[([\d]+)\]/, "$1_$2[$3][" + index + "]" );
} else if ( name.match(/([a-zA-Z+]+)\[([\d-\w_]+)-([\d]+)+(-[\w_]+)?\]/) ) {
name = name.replace( /([a-zA-Z+]+)\[([\d-\w_]+)-([\d]+)+(-[\w_]+)?\]/, "$1[$2-" + index + "$4]" );
} else if ( name.match(/([\a-zA-Z]+)+\_+([0-9])/) ) {
name = name.replace( /([\a-zA-Z]+)+\_+([0-9])/, "$1_" + index );
}

I changed it for this and it works fine (but I'm not sure if it's all ok):
if( name.match(/([a-z]+)+_([\d]+)\[([\d]+)\]\[([\d]+)\]/) ) {
name = name.replace( /([a-z]+)+_([\d]+)\[([\d]+)\]\[([\d]+)\]/, "$1_$2[$3][" + index + "]" );
} else if ( name.match(/([a-zA-Z+]+)\[([\d-\w_]+)-([\d]+)+(-[\w_]+)?\]/) ) {
name = name.replace( /([a-zA-Z+]+)\[([\d-\w_]+)-([\d]+)+(-[\w_]+)?\]/, "$1[$2-" + index + "$4]" );
} else if ( name.match(/([a-zA-Z]+)+\_+([0-9])/) ) {
name = name.replace( /([a-zA-Z]+)+\_+([0-9])/, "$1_" + index );
}

Maybe it's yet fixed like in:
http://share.ez.no/forums/extensions/bad-rewriterule-on-install-file-ezjscore-1.3.0

Related: http://issues.ez.no/IssueView.php?Id=18247&activeItem=87

My personal site: http://israel-martin.es
eZ Publish Developer Basics Certification (4.4): http://ez.no/certification/verify/388211