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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sevi’s picture

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?

As far as I know: no.

Which versions of Views and Drupal do you use?
Did you run update.php?

ti2m’s picture

Same 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

function draggableviews_view_draggabletable_form($form_state, $style_plugin) {

Seems to work for now, will test it a bit more.....

quicksketch’s picture

Title: I updated to the latest version and i can no longer see my draggable view » PHP Notices prevent draggable views from previewing
Category: support » bug
Status: Active » Needs review
FileSize
819 bytes

This 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:

allow_call_time_pass_reference = Off

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.

quicksketch’s picture

Title: PHP Notices prevent draggable views from previewing » PHP Warnings (call-time pass-by-reference) prevent draggable views from previewing

Sorry this is actually a PHP warning, not a notice.

sevi’s picture

Your 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.

quicksketch’s picture

Project: DraggableViews » Flag Weights
Version: 6.x-3.3 » 6.x-1.x-dev

Thanks 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.

benkallos’s picture

Project: Flag Weights » DraggableViews
Version: 6.x-1.x-dev » 6.x-3.4
Component: Miscellaneous » Code

The 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.

sevi’s picture

The solution on #2 fixed the problem for me on DraggableViews.

But 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?

Grayside’s picture

#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()

sevi’s picture

Status: Needs review » Fixed
FileSize
704 bytes

Overruled :)
OK, commtted attached patch to dev-version.

Greetings,
sevi

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.