Layout not movable

Permalink 10 8 Browser Info Environment
- create a layout inside an area.
- create a few blocks in the same area.
Now if you try to drag & drop a layout within this area, the first time it will happen without any problems. If you try to move it a second time, without previously saving the changes, you'll get the following js error in the console:

Uncaught TypeError: Cannot read property 'contendingDragAreas' of undefined

If you got a layout inside another layout, you can't drag & drop the second level layout even once, without getting the error.

Status: New
alexaalto replied on at Permalink Reply
I too have this same problem using a modified version of the out of box C5 theme. Looking closely at the javascript error in the Chrome console, I see the issue occurs here in /concrete/js/app.js (formatted in the Chrome console):

f.bindEvent("EditModeBlockDrag", _.throttle(function(c, d) {
                if (f.getDragging()) {
                    var j, k = d.block, l = d.pep, m = f.getAreas();
                    k instanceof Concrete.Layout && (m = [_(m).find(function(a) {
                        return k.getArea() === a
                    j = _.flatten(_(m).map(function(a) {
                        var b = a.contendingDragAreas(l, k);
                        return b
                    }), !0),

...where the problem seems to be with this code:

k instanceof Concrete.Layout && (m = [_(m).find(function(a) {
                        return k.getArea() === a

It seems that "k.getArea() === a" always fails after the first drag and drop attempt - however if we compare by ID only by changing it to "k.getAreaId() ===" then THIS WORKS! I edited the compressed app.js with this change and can drag and drop layouts as expected.

Not sure how to get this into the repo tho...


katalysis replied on at Permalink Reply
Tested and confirmed

concrete5 Environment Information

# concrete5 Version
Core Version - 8.2.1
Version Installed - 8.2.1
Database Version - 20170802000000

# concrete5 Packages

# concrete5 Overrides
blocks/image_slider/templates/slider_benefitblocks/view.php, blocks/image_slider/templates/slider_benefitblocks, blocks/image_slider/templates, blocks/image_slider, blocks/horizontal_rule/view.php, blocks/horizontal_rule, blocks/autonav/templates/flat_navigation/view.css, blocks/autonav/templates/flat_navigation/view.php, blocks/autonav/templates/flat_navigation, blocks/autonav/templates/bootstrap/view.css, blocks/autonav/templates/bootstrap/view.php, blocks/autonav/templates/bootstrap, blocks/autonav/templates, blocks/autonav, elements/header_required.php, elements/footer_required.php, themes/standard/full.php, themes/standard/css/bootstrap-theme.min.css, themes/standard/css/components/image_slider/slider.less, themes/standard/css/components/image_slider, themes/standard/css/components/content.less, themes/standard/css/components/partner.less, themes/standard/css/components/footer.less, themes/standard/css/components/basic.less, themes/standard/css/components/header.less, themes/standard/css/components/navigation.less, themes/standard/css/components/slider.less, themes/standard/css/components/news.less, themes/standard/css/components/horizontal-rule.less, themes/standard/css/components/autonav/bootstrap.less, themes/standard/css/components/autonav, themes/standard/css/components/font.less, themes/standard/css/components/formular.less, themes/standard/css/components, themes/standard/css/styles.less, themes/standard/css/bootstrap.min.css, themes/standard/css, themes/standard/description.txt, themes/standard/inc/header.php, themes/standard/inc/footer.php, themes/standard/inc, themes/standard/page_theme.php, themes/standard/fonts/gewers.svg, themes/standard/fonts/gewers.eot, themes/standard/fonts/gewers.ttf, themes/standard/fonts/gewers.woff, themes/standard/fonts, themes/standard/img/fraesung_gewers.svg, themes/standard/img/gutachten_gewers.svg, themes/standard/img/Gewers_Baumpflege.svg, themes/standard/img/beratung_gewers.svg, themes/standard/img/background-slider-img.jpg, themes/standard/img/pflege_gewers.svg, themes/standard/img/Trennlinie.png, themes/standard/img/faellung_gewers.svg, themes/standard/img/navi_icon.png, themes/standard/img/trennline_punkt.png, themes/standard/img/trennlinie.svg, themes/standard/img/Gewers_Baumpflege.png, themes/standard/img, themes/standard/default.php, themes/standard/js/safeMail.js, themes/standard/js/bootstrap.min.js, themes/standard/js/modernizr.js, themes/standard/js/scripts.js, themes/standard/js, themes/standard

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every minutes.

# Server Software

# Server API

# PHP Version

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, libxml, mbstring, mcrypt, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, SimpleXML, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib

# PHP Settings
max_execution_time - 0
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 15000
memory_limit - 384M
post_max_size - 120M
se_memory_limit - 2048M
sql.safe_mode - Off
upload_max_filesize - 150M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 10000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36