Hello,
I installed recently all new DEV versions. I don't know exactly which one causes the problem but it's after end of January 2015.
Now if I go in Structure / Content Types / XXX / Manage Display, I can't drag fields anymore and Weight column appears.
URL : /admin/structure/types/manage/xxx/display
And I have this JS error :
TypeError: tableDrag is undefined
tableDrag.onDrop = this.onDrop;
in Core JS file : /modules/field_ui/fields_ui.js line 120
attach: function (table, rowsData, rowHandlers) {
var tableDrag = Drupal.tableDrag[table.id];
// Add custom tabledrag callbacks.
tableDrag.onDrop = this.onDrop;
tableDrag.row.prototype.onSwap = this.onSwap;
If I go to admin/config/development/performance/advagg
And just disable AdvAgg by unchecking Enable advanced aggregation : it works again
I checked, others dragging functions like in Blocks page for example, or Rearrange fields in Views : they are working.
I just see this problem in Manage Display.
Best regards
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | dragging_fields_in-2426731-5.patch | 752 bytes | joelpittet |
Comments
Comment #1
frank.dev commentedsame
Comment #2
socialnicheguru commentedI am getting the same thing too.
I also tried it with 'created .gz' enabled and disabled with the same error.
Disabling advagg gets rid of the error
Comment #3
joelpittetSame here, it seems that the JS weights aren't being adhered to. When I stepped through the weights looked correct but tabledrag.js was loading after field_ui.js
Comment #4
joelpittetOk seems to be a PHP problem with the way this was implemented inside
advagg_drupal_sort_css_js_stable():https://bugs.php.net/bug.php?id=32671
http://stackoverflow.com/questions/4542234/working-with-an-array-with-pe...
Try this to see:
php -r '$value = -0.959; $array[$value] = TRUE; var_dump($array);'Comment #5
joelpittetHere's a patch.
Comment #6
srobert72 commentedIt works for me
@joelpittet : Thank you very much !!
I searched in commits history, but didn't find if it's a recent commit that caused this issue
Comment #7
joelpittet@srobert72 you are very welcome, want to RTBC this so we can get this fixed up?
Thank you for reporting, I thought it was some other module messing with the weights before I started stepping through the code and happened upon that.
Comment #9
mikeytown2 commentedPatch looks good! It's been committed. Will update this issue so we can get this fixed in D8
#1388546: Adding CSS or JS files twice changes weight
Comment #10
mikeytown2 commentedComment #11
joelpittet@mikeytown2 thank you for the super quick fix.
Comment #13
sijuwi commentedNot sure if this is related but if I check 'All but extrenal scripts' under 'Deferred JavaScript Execution: Add The defer Tag To All Script Tags' then I lose all my dragable weights under Content types >> 'Manage fields'
Version: Version: 7.x-2.21
Comment #14
mikeytown2 commented@sijuwi
Create a new issue, this one is over a year old. Also try a newer version of AdvAgg.