I have just tried updating the Views 6.x-3.x-dev module which was released 12 April.

After updating I went to the homepage and saw the following error

"Parse error: syntax error, unexpected T_CLASS, expecting T_FUNCTION in /home/username/public_html/sites/all/modules/views/handlers/views_handler_field.inc on line 1117"

I have now reverted to the version which was released 11 April.

Incidentally I also went to the site report logs and noticed that I am getting alot "Invalid argument supplied for foreach() in /home/username/public_html/sites/all/modules/views/includes/view.inc on line 1859." messages during the update process.

I also found these errors yesterday when I updated the same module which you released yesterday

Comments

merlinofchaos’s picture

Status: Active » Fixed

Whoops. Committed a typo. Fixed and pushed.

jerdiggity’s picture

@Bob3009 (and anyone else having this problem):

In the meantime (until the new dev version is rolled), adding a } to line 303 of views/handlers/views_handler_field.inc should hold you over if you'd rather avoid reverting back.

Basically (starting with line 300) you want it to go from this:

  function element_wrapper_classes($row_index = NULL) {
    $classes = $this->tokenize_value($this->options['element_wrapper_class'], $row_index);
    return views_css_safe($classes);

  function option_definition() {



to this:

  function element_wrapper_classes($row_index = NULL) {
    $classes = $this->tokenize_value($this->options['element_wrapper_class'], $row_index);
    return views_css_safe($classes);
  }
  function option_definition() {

@merlin: feel free to yell at me if that's incorrect... Either way, worked for me as a temp fix.
:)

merlinofchaos’s picture

HTF’s picture

Hi Jerdiggity

Thanks for that, I think I will wait until it is next released though.

Any idea about the "Invalid argument supplied for foreach() in /home/username/public_html/sites/all/modules/views/includes/view.inc on line 1859." messages during the update process
I get this about 24 times after I re-enable the views module follwed by one of the following:

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY vid, position' at line 1 query: SELECT * FROM views_display WHERE vid IN () ORDER BY vid, position in /home/username/public_html/sites/all/modules/views/includes/view.inc on line 1410."

Status: Fixed » Closed (fixed)

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