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.
Previously on my drupal website I had created view pages with the draggable view type.. ever since I have updated to 3.3 I now get this message instead of my view showing. I cannot quite understand why!
warning: Parameter 2 to draggableviews_view_draggabletable_form() expected to be a reference, value given in C:\wamp\www\mysite\includes\form.inc on line 372.
Have I missed something out in the configuration of my draggable view. What I mean is, are there any changes I need to make for the configuration of a draggable view on the views admin since the update? If so, what?
Comment | File | Size | Author |
---|---|---|---|
#10 | draggableviews-693400.patch | 704 bytes | sevi |
#3 | draggableviews_pass_by_reference.patch | 819 bytes | quicksketch |
Comments
Comment #1
sevi CreditAttribution: sevi commentedAs far as I know: no.
Which versions of Views and Drupal do you use?
Did you run update.php?
Comment #2
ti2m CreditAttribution: ti2m commentedSame here, issue with PHP 5.3 (see #360605: PHP 5.3 Compatibility)
Am not sure about the whole reference but value given. Could be that in case of complex variable types being passed to the function, the & can be removed.
So for now I removed the & of the second argument, so line 92 looks like this
Seems to work for now, will test it a bit more.....
Comment #3
quicksketchThis is just a small bug in the code. I'm running the latest CVS version from the DRUPAL-6--3 branch and there's just a pass-by-reference problem. This affects all versions of PHP if you have the following PHP option set:
Note that "Off" is the default setting on many distributions, meaning this problem probably affects a lot of users. The solution is simple though, just remove the & from the call to
parent::init($field_name, $view);
, this has no change in functionality (since the parent method specifies &$view) and should fix the problem.Comment #4
quicksketchSorry this is actually a PHP warning, not a notice.
Comment #5
sevi CreditAttribution: sevi commentedYour patch refers to the "Flag Weights" handler of the "Flag Weights" module http://drupal.org/project/flag_weights.
As far as I know this issue has already been fixed for all the handlers provided by DraggableViews.
Please file an issue at Flag Weights.
Comment #6
quicksketchThanks sevi, you're right. However the error I received is exactly what was described in the original issue, so perhaps this was simply misfiled to begin with. If not, please excuse my hijack of the issue. I'll just move this issue over to Flag Weights directly.
Comment #7
benkallos CreditAttribution: benkallos commentedThe solution on #2 fixed the problem for me on DraggableViews.
I think that this issue was inadvertently hijacked so I moving this back.
I recommend posting the patch under Flag Weights separately.
Comment #8
sevi CreditAttribution: sevi commentedBut the solution on #2 changes functionality.
Now, what is your exact error message? The warning from the starting post?
Does this issue remain when you deactivate "Flag Weights" module?
Comment #9
Grayside CreditAttribution: Grayside commented#2 also works for me. It does not appear to change functionality, as the $style_plugin variable is not altered in
draggableviews_view_draggabletable_form()
Comment #10
sevi CreditAttribution: sevi commentedOverruled :)
OK, commtted attached patch to dev-version.
Greetings,
sevi