Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, great module but I'm getting this error when I add and then remove a paragraph.
Notice: Undefined index: _weight in _field_sort_items_helper() (line 537 of /home/MYSITE/public_html/tests/modules/field/field.module).
Warning: uasort() [function.uasort]: Array was modified by the user comparison function in paragraphs_remove_submit() (line 1526 of /home/MYSITE/public_html/tests/sites/all/modules/paragraphs/paragraphs.module).
Using Drupal 7.24 and Paragraph 7.x-1.0-alpha6
Any ideas as to why I'm getting this?
Comment | File | Size | Author |
---|---|---|---|
#8 | paragraphs_notice_warning-2142067-8.patch | 1.61 KB | xumepadismal |
Comments
Comment #1
jeroen.b CreditAttribution: jeroen.b commentedI can't reproduce this...
What PHP version are you using?
Are you using any other modules that might alter the weight/sort table?
Comment #2
jeroen.b CreditAttribution: jeroen.b commentedComment #3
Babymaggie CreditAttribution: Babymaggie commentedHi, Jeroen
I'm Using PHP 5.3.24
Looking through my list of modules I can't see any that would alter the weight/sort table.
Comment #4
Babymaggie CreditAttribution: Babymaggie commentedI have changed to PHP 5.5.5, Cleared caches, ran update scripts etc but the error still remains. Other modules are now showing errors so I will have to revert back for now.
Comment #5
jeroen.b CreditAttribution: jeroen.b commentedHmm odd... Well, some more questions then...
What version of Entity? What theme/admin theme are you using?
Comment #6
Babymaggie CreditAttribution: Babymaggie commentedI'm using Admin theme: Seven 7.24
Using site default theme: Simpler 7.x-1.0-beta2.
Tried both: 7.x-1.2 and 7.x-1.x-dev of Entity, neither versions fixed the fault though.
Comment #7
markomat CreditAttribution: markomat commentedGot the same notice messages when I ran Paragraphs (alpha6) on http://simplytest.me today
Status report says:
Drupal 7.25-dev
Entity API 7.x-1.2
(no other contrib module active)
PHP 5.3.10-1ubuntu3.5
Comment #8
xumepadismal CreditAttribution: xumepadismal commentedSame issue. I've figured out that it's because of 'add_more' button's value passes into $input array. It doesn't have '_weight' property of course and it breaks the '_field_sort_items_helper' function.
I guess that we can just remove it from $input because this button even not pressed, am I right? Patch attached.
Comment #9
jeroen.b CreditAttribution: jeroen.b commentedThanks! Patch pushed in alpha9, please test!
Comment #10
Babymaggie CreditAttribution: Babymaggie commentedJust tried the updated module and this has done the trick.
I have completely redone the main part of my site to incorporate paragraphs now.
This has bought a massive change to usability of the site and to the end users enjoyment.
Many thanks to xumepadismal, jeroen.b, markomat and all who helped solve and work on the solution to this problem.
Lovely module :)
Comment #11
jeroen.b CreditAttribution: jeroen.b commented