欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

Declaration of views_handler_filter_many_to_one::init() should be compatible with that of views_handler_filter::init()

After upgrading over the weekend and enabling caching in each view, I'm seeing the above error in my logs from Boost. A complete sample from the logs is:

Dec 7 08:34:30 crca drupal: http://www.crca.org.au|1260174870|boost|65.55.207.78|http://www.crca.org.au/Resources/WordOfSalvation/TheSevenTrumpets||0||There are php errors on this page, preventing boost from caching. ERROR: Array [type] => 2048 [message] => Declaration of views_handler_filter_many_to_one::init() should be compatible with that of views_handler_filter::init() [file] => /home/crca-website/public_html/sites/all/modules/views/handlers/views_handler_filter_many_to_one.inc [line] => 0 Lookup Error Type Turn Off Error Checking

Regards,

NIgel

Files: 
CommentFileSizeAuthor
#38653628-38.patch6.5 KBvijaycs85
 
#18cck.diff928 byteskeinstein
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch cck_0.diff. Unable to apply patch. See the log in the details link for more information. View
#18date_handler_field_multiple.inc_.diff704 byteskeinstein
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch date_handler_field_multiple.inc_.diff. Unable to apply patch. See the log in the details link for more information. View
#13views.diff14.3 KBkeinstein
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views_1.diff. Unable to apply patch. See the log in the details link for more information. View
#9views-653628.patch13.19 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-653628_0.patch. Unable to apply patch. See the log in the details link for more information. View

Comments

dawehner’s picture

 

Comment#1

dawehner CreditAttribution: dawehner commented 
Status:Active» Fixed

http://drupal.org/cvs?commit=299206

This was fixed by merlinofchaos.

NigelCunningham’s picture

 

Comment#2

NigelCunningham CreditAttribution: NigelCunningham commented 

Great. Should I try devel then? (Assuming there is one - haven't looked yet)

dawehner’s picture

 

Comment#3

dawehner CreditAttribution: dawehner commented 

yes there is. But the dev version needs perhaps 6 or 12 hours to be build. Perhaps its not fixed in the latest dev version.

merlinofchaos’s picture

 

Comment#4

merlinofchaos CreditAttribution: merlinofchaos commented 
FileSize
653628-extra-ampersand.patch3.69 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 653628-extra-ampersand.patch. Unable to apply patch. See the log in the details link for more information. View

Ack, I got distracted after the commit and did not post the patch that I used here:

NigelCunningham’s picture

 

Comment#5

NigelCunningham CreditAttribution: NigelCunningham commented 
Status:Fixed» Active

It looks to me like there are similar issues with some other code:

After that one is out of the way, i'm now seeing:

http://www.crca.org.au|1260266705|boost|67.195.112.126|http://www.crca.org.au/Resources/WordOfSalvation?page=10||0||There are php errors on this page, preventing boost from caching. ERROR: Array [type] => 2048 [message] => Declaration of views_handler_filter_term_node_tid::value_validate() should be compatible with that of views_handler_filter::value_validate() [file] => /home/crca-website/public_html/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc [line] => 0 Lookup Error Type Turn Off Error Checking

and

http://www.crca.org.au|1260248779|boost|66.249.71.148|http://www.crca.org.au/AboutUs/WhoWeAre/Locations/Blaxland||0||There are php errors on this page, preventing boost from caching. ERROR: Array [type] => 2048 [message] => Declaration of views_handler_filter::options_validate() should be compatible with that of views_handler::options_validate() [file] => /home/crca-website/public_html/sites/all/modules/views/handlers/views_handler_filter.inc [line] => 0 Lookup Error Type Turn Off Error Checking

Regards,

Nigel

dagmar’s picture

 

Comment#6

dagmar CreditAttribution: dagmar commented 
Status:Active» Needs review
Issue tags: +alpha-2 blocker
FileSize
views-653628.patch2.46 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-653628.patch. Unable to apply patch. See the log in the details link for more information. View

Yes, I found 2 more. Thanks for reporting.

NigelCunningham’s picture

 

Comment#7

NigelCunningham CreditAttribution: NigelCunningham commented 
Status:Needs review» Reviewed & tested by the community

Thanks.

That seems to have gotten rid of the errors. Unfortunately I've now discovered another (unrelated) bug - will go see if anyone has reported it already.

NigelCunningham’s picture

 

Comment#8

NigelCunningham CreditAttribution: NigelCunningham commented 
Status:Reviewed & tested by the community» Active

Hi again.

Got some more, I'm afraid...

Dec 11 02:19:07 crca drupal: http://www.crca.org.au|1260497947|boost|67.195.112.126|http://www.crca.org.au/category/Tags/resurrectionofChrist||0||There are php errors on this page, preventing boost from caching. ERROR: Array [type] => 2048 [message] => Declaration of views_handler_filter::options_submit() should be compatible with that of views_handler::options_submit() [file] => /home/crca-website/public_html/sites/all/modules/views/handlers/views_handler_filter.inc [line] => 0 Lookup Error Type Turn Off Error Checking
Dec 11 02:22:11 crca drupal: http://www.crca.org.au|1260498131|boost|202.148.231.138|http://www.crca.org.au/|http://www.google.com.au/search?hl=en&source=hp&q=CRCA&meta=&aq=f&oq=|0||There are php errors on this page, preventing boost from caching. ERROR: Array [type] => 2048 [message] => Declaration of views_plugin_style_default::options() should be compatible with that of views_object::options() [file] => /home/crca-website/public_html/sites/all/modules/views/plugins/views_plugin_style_default.inc [line] => 0 Lookup Error Type Turn Off Error Checking
Dec 11 02:22:11 crca drupal: http://www.crca.org.au|1260498131|boost|202.148.231.138|http://www.crca.org.au/|http://www.google.com.au/search?hl=en&source=hp&q=CRCA&meta=&aq=f&oq=|0||There are php errors on this page, preventing boost from caching. ERROR: Array [type] => 2048 [message] => Declaration of views_handler_field_user::init() should be compatible with that of views_handler_field::init() [file] => /home/crca-website/public_html/sites/all/modules/views/modules/user/views_handler_field_user.inc [line] => 0 Lookup Error Type Turn Off Error Checking
Dec 11 02:25:51 crca drupal: http://www.crca.org.au|1260498351|boost|65.55.207.51|http://www.crca.org.au/Resources/WordOfSalvation/ByTitle?page=1||0||There are php errors on this page, preventing boost from caching. ERROR: Array [type] => 2048 [message] => Declaration of views_handler_filter_user_name::value_submit() should be compatible with that of views_handler_filter_in_operator::value_submit() [file] => /home/crca-website/public_html/sites/all/modules/views/modules/user/views_handler_filter_user_name.inc [line] => 0 Lookup Error Type Turn Off Error Checking

Regards,

Nigel

dawehner’s picture

 

Comment#9

dawehner CreditAttribution: dawehner commented 
Status:Active» Needs review
FileSize
views-653628.patch13.19 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-653628_0.patch. Unable to apply patch. See the log in the details link for more information. View

I greped and found some other ones.

all options_submit
all init
all value_submit

based on dagmars patch for views 3.x

merlinofchaos’s picture

 

Comment#10

merlinofchaos CreditAttribution: merlinofchaos commented 

So I should use #6 for Views 2 and #9 for Views 3? Or do we need a separate patch for Views 2?

dawehner’s picture

 

Comment#11

dawehner CreditAttribution: dawehner commented 

#9 Fixes much more places then #6. So #9 would have to be applied to 2.x too.

merlinofchaos’s picture

 

Comment#12

merlinofchaos CreditAttribution: merlinofchaos commented 
Status:Needs review» Needs work
Issue tags:-alpha-2 blocker 

Committed to 3.x; however, this does not apply to 2.x. It probably should be rerolled for 2.x (and possilby 7.x-3.x?)

dawehner’s picture

 

Comment#13

keinstein CreditAttribution: keinstein commented 
FileSize
views.diff14.3 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views_1.diff. Unable to apply patch. See the log in the details link for more information. View

adaption of views-653628.patch to 6.x-2.10 I didn't search for additional places.

there is still an error message “Declaration of views_plugin_row::options_validate() should be compatible with that of views_plugin::options_validate() E:\esg\sites\all\modules\views\plugins\views_plugin_row.inc:135”, but I don't know whats wrong there.

dawehner’s picture

 

Comment#14

keinstein CreditAttribution: keinstein commented 

I'm not sure, if I interpreted value_validate right. I've decided to use the form
function value_validate($form, &$form_state);
This triggers #774270 Can someone confirm that this interpretation is right?

dawehner’s picture

 

Comment#15

dawehner CreditAttribution: dawehner commented 
Status:Needs work» Needs review

Update ststus

NigelCunningham’s picture

 

Comment#16

NigelCunningham CreditAttribution: NigelCunningham commented 

Testing it now against views-dev from a day or two ago.

NigelCunningham’s picture

 

Comment#17

NigelCunningham CreditAttribution: NigelCunningham commented 

Still getting some:

views_plugin_access_role::options_submit() should be compatible with that of views_plugin_access::options_submit()
views_handler_filter_user_name::value_submit() should be compatible with that of views_handler_filter_in_operator::value_submit()
(Unrelated, I assume) rules_data_type_string::get_default_input_form() should be compatible with that of rules_data_type::get_default_input_form()

dawehner’s picture

 

Comment#18

keinstein CreditAttribution: keinstein commented 
FileSize
date_handler_field_multiple.inc_.diff704 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch date_handler_field_multiple.inc_.diff. Unable to apply patch. See the log in the details link for more information. View
cck.diff928 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch cck_0.diff. Unable to apply patch. See the log in the details link for more information. View
views.diff14.3 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views_2.diff. Unable to apply patch. See the log in the details link for more information. View

I have another patch. This might be my last one on this issue. So don't rely on me, please.

There was one pre_render(&value) function somewhere in the views code. At a first glance I didn't know, how to avoid that. So I changed all occurrences of pre_render to be called by reference. This affects also the cck and the date module. I attach some prelimnary patches here. If you decide to follow my decition, they must be forwarded to the corresponding projects.

dawehner’s picture

 

Comment#19

dawehner CreditAttribution: dawehner commented 
Status:Needs review» Needs work

Please make a patch from the root of views. This is really hard to apply

dawehner’s picture

 

Comment#20

dawehner CreditAttribution: dawehner commented 

I did this for 7.x-3.x too, i think.

Kristen Pol’s picture

 

Comment#21

Kristen Pol CreditAttribution: Kristen Pol commented 

I'm seeing these errors when using authcache, and I'm not clear on the status of this... Is there a 6.x release that includes the fixes? Or do I need to use dev?

Thanks,
Kristen

dawehner’s picture

 

Comment#22

dawehner CreditAttribution: dawehner commented 

This is not even fixed in dev.

Kristen Pol’s picture

 

Comment#23

Kristen Pol CreditAttribution: Kristen Pol commented 

Thanks for the update. Do you need help getting it in for D6? Let me know what I can do.

Kristen

AlexisWilke’s picture

 

Comment#25

AlexisWilke CreditAttribution: AlexisWilke commented 

I have many similar problems right now, in 6x.3.x-dev

I suppose that options_validate() should not use the & but it was there except in two places so I re-instated it in my version. Works nice now. 8-)

function query($get_count = FALSE);
function options_submit($form, &$form_state);
function options_validate(&$form, &$form_state);
grep 'ion query' views/* views/*/*
views/handlers/views_handler_area.inc:  function query($get_count = FALSE) { }
views/handlers/views_handler_area.inc:  function query($get_count = FALSE) { /* No query to run */ }
views/handlers/views_handler_argument_formula.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_argument_group_by_numeric.inc:  function query($group_by = FALSE) {
views/handlers/views_handler_argument.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_argument.inc:  function query($get_count = FALSE) { /* No query to run */ }
views/handlers/views_handler_argument_many_to_one.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_argument_null.inc:  function query($get_count = FALSE) {}
views/handlers/views_handler_argument_numeric.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_argument_string.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_field_counter.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_field_custom.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_field_group_by_numeric.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_field.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_field.inc:  function query($get_count = FALSE) { /* No query to run */ }
views/handlers/views_handler_field_math.inc:  function query($get_count = FALSE) { }
views/handlers/views_handler_filter_boolean_operator.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_filter_boolean_operator_string.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_filter_group_by_numeric.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_filter.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_filter.inc:  function query($get_count = FALSE) { /* No query to run */ }
views/handlers/views_handler_filter_in_operator.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_filter_numeric.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_filter_string.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_relationship.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_relationship.inc:  function query($get_count = FALSE) { /* No query to run */ }
views/handlers/views_handler_sort_date.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_sort_formula.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_sort_group_by_numeric.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_sort.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_sort.inc:  function query($get_count = FALSE) { /* No query to run */ }
views/handlers/views_handler_sort_menu_hierarchy.inc:  function query($get_count = FALSE) {
views/handlers/views_handler_sort_random.inc:  function query($get_count = FALSE) {
views/includes/handlers.inc:  function query($group_by = FALSE) { }
views/includes/plugins.inc:  function query($get_count = FALSE) { }
views/plugins/views_plugin_display.inc:  function query($get_count = FALSE) {  }
views/plugins/views_plugin_exposed_form.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_exposed_form_input_required.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_pager_full.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_pager.inc:  function query($get_count = FALSE) { }
views/plugins/views_plugin_pager_none.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_pager_some.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_query_default.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_query.inc:  function query($get_count = FALSE) { }
views/plugins/views_plugin_row.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_style.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_style_summary.inc:  function query($get_count = FALSE) {
views/plugins/views_plugin_style_summary_jump_menu.inc:  function query($get_count = FALSE) {

grep 'ion options_validate' views/* views/*/*
views/handlers/views_handler_argument.inc:  function options_validate(&$form, &$form_state) {
views/handlers/views_handler_field_serialized.inc:  function options_validate(&$form, &$form_state) {
views/handlers/views_handler_filter_date.inc:  function options_validate(&$form, &$form_state) {
views/handlers/views_handler_filter.inc:  function options_validate(&$form, &$form_state) {
views/handlers/views_handler_sort.inc:  function options_validate(&$form, &$form_state) {
views/includes/handlers.inc:  function options_validate(&$form, &$form_state) { }
views/includes/plugins.inc:  function options_validate(&$form, &$form_state) { }
views/plugins/views_plugin_access.inc:  function options_validate(&$form, &$form_state) { }
views/plugins/views_plugin_access_role.inc:  function options_validate(&$form, &$form_state) {
views/plugins/views_plugin_argument_default.inc:  function options_validate(&$form, &$form_state) { }
views/plugins/views_plugin_argument_validate.inc:  function options_validate(&$form, &$form_state) { }
views/plugins/views_plugin_display.inc:  function options_validate(&$form, &$form_state) {
views/plugins/views_plugin_display_page.inc:  function options_validate(&$form, &$form_state) {
views/plugins/views_plugin_pager_full.inc:  function options_validate(&$form, &$form_state) {
views/plugins/views_plugin_pager.inc:  function options_validate(&$form, &$form_state) { }
views/plugins/views_plugin_query.inc:  function options_validate(&$form, &$form_state) { }
views/plugins/views_plugin_row.inc:  function options_validate(&$form, &$form_state) { }

grep options_submit views/* views/*/*
views/handlers/views_handler_area_text.inc:  function options_submit($form, &$form_state) {
views/handlers/views_handler_area_text.inc:    parent::options_submit($form, $form_state);
views/handlers/views_handler_argument.inc:  function options_submit($form, &$form_state) {
views/handlers/views_handler_argument.inc:      $plugin->options_submit($form['argument_default'][$default_id], $form_state, $options);
views/handlers/views_handler_argument.inc:      $plugin->options_submit($form['argument_validate'][$validate_id], $form_state, $options);
views/handlers/views_handler_filter.inc:  function options_submit($form, &$form_state) {
views/handlers/views_handler_sort.inc:  function options_submit($form, &$form_state) {
views/includes/admin.inc:  $display->handler->options_submit($form, $form_state);
views/includes/admin.inc:  $display->handler->options_submit($form, $form_state);
views/includes/admin.inc:  $form_state['handler']->options_submit($form['options'], $form_state);
views/includes/admin.inc:  $form_state['handler']->extra_options_submit($form['options'], $form_state);
views/includes/admin.inc:  $form_state['handler']->options_submit($form['options'], $form_state);
views/includes/admin.inc:  $form_state['handler']->options_submit($form['style_options'], $form_state);
views/includes/handlers.inc:  function options_submit($form, &$form_state) { }
views/includes/handlers.inc:  function extra_options_submit($form, &$form_state) { }
views/includes/plugins.inc:  function options_submit($form, &$form_state) { }
views/plugins/views_plugin_access.inc:  function options_submit($form, &$form_state) { }
views/plugins/views_plugin_access_role.inc:  function options_submit($form, &$form_state) {
views/plugins/views_plugin_argument_default.inc:  function options_submit($form, &$form_state) { }
views/plugins/views_plugin_argument_validate.inc:  function options_submit(&$form, &$form_state) { }
views/plugins/views_plugin_display_attachment.inc:  function options_submit($form, &$form_state) {
views/plugins/views_plugin_display_attachment.inc:    parent::options_submit($form, $form_state);
views/plugins/views_plugin_display_block.inc:  function options_submit($form, &$form_state) {
views/plugins/views_plugin_display_block.inc:    parent::options_submit($form, $form_state);
views/plugins/views_plugin_display_feed.inc:  function options_submit($form, &$form_state) {
views/plugins/views_plugin_display_feed.inc:    parent::options_submit($form, $form_state);
views/plugins/views_plugin_display.inc:  function options_submit($form, &$form_state) {
views/plugins/views_plugin_display.inc:          $plugin->options_submit($form['access_options'], $form_state);
views/plugins/views_plugin_display.inc:          $plugin->options_submit($form['cache_options'], $form_state);
views/plugins/views_plugin_display.inc:          $plugin->options_submit($form['query']['options'], $form_state);
views/plugins/views_plugin_display.inc:          $plugin->options_submit($form[$section], $form_state);
views/plugins/views_plugin_display.inc:          $plugin->options_submit($form['exposed_form_options'], $form_state);
views/plugins/views_plugin_display.inc:          $plugin->options_submit($form['pager_options'], $form_state);
views/plugins/views_plugin_display_page.inc:  function options_submit($form, &$form_state) {
views/plugins/views_plugin_display_page.inc:    parent::options_submit($form, $form_state);
views/plugins/views_plugin_exposed_form_input_required.inc:  function options_submit($form, &$form_state) {
views/plugins/views_plugin_exposed_form_input_required.inc:    parent::options_submit($form, $form_state);
views/plugins/views_plugin_pager.inc:  function options_submit($form, &$form_state) { }
views/plugins/views_plugin_query.inc:  function options_submit($form, &$form_state) { }
views/plugins/views_plugin_row_fields.inc:  function options_submit($form, &$form_state) {
views/plugins/views_plugin_row.inc:  function options_submit($form, &$form_state) { }
AlexisWilke’s picture

 

Comment#26

AlexisWilke CreditAttribution: AlexisWilke commented 
FileSize
views-3.x-incompatible_signature-6.x.patch22.69 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-3.x-incompatible_signature-6.x.patch. Unable to apply patch. See the log in the details link for more information. View

Just in case, I'm attaching a 3.x-dev patch.

Thank you.
Alexis Wilke

P.S. the patch below is not 100% complete, but that's a quite good start already.

AlexisWilke’s picture

 

Comment#27

AlexisWilke CreditAttribution: AlexisWilke commented 

This is still not resolved... and I have not gotten any good answer on whether it should be one way or the other. Maybe no one knows... 8-)

Anyway, there is me looking at the function query($get_count = FALSE) that remains. There are several still! (Most lost their parameters and for the few that did not yet lose their parameter they generally don't need it.)

So... function compile_fields() from views/plugins/views_plugin_query_default.inc around line 920:

  function compile_fields($fields_array) {
    $fields = $distinct = array();
    $non_aggregates = array();

    foreach ($fields_array as $field) {
      $string = '';
      if (!empty($field['table'])) {
        $string .= $field['table'] . '.';
      }
      $string .= $field['field'];
      // store for use with non-aggregates below
      $fieldname = (!empty($field['alias']) ? $field['alias'] : $string);

      if (!empty($field['distinct'])) {
        $string = "DISTINCT($string)";
      }

      if (!empty($field['count'])) {
        // Retained for compatibility
        $field['function'] = 'count';
      }

      if (!empty($field['function'])) {
        $info = $this->get_aggregation_info();
        if (!empty($info[$field['function']]['method']) && function_exists($info[$field['function']]['method'])) {
          $string = $info[$field['function']]['method']($field['function'], $string);
        }

        $this->has_aggregate = TRUE;
      }
      elseif ($this->distinct && !in_array($fieldname, $this->groupby)) {
        $string = $GLOBALS['db_type'] == 'pgsql' ? "FIRST($string)" : $string;
      }
      elseif (empty($field['aggregate'])) {
        $non_aggregates[] = $fieldname;
      }

      if ($field['alias']) {
        $string .= " AS $field[alias]";
      }

      if (!empty($field['distinct']) && empty($field['function'])) {
        $distinct[] = $string;
      }
      else {
        $fields[] = $string;
      }

      if (!empty($get_count_optimized)) {
        // We only want the first field in this case.
        break;
      }
    }
    return array(
      $distinct,
      $fields,
      $non_aggregates,
    );
  }

The if (!empty($get_count_optimized)) (last if() in the function) checks a function that's not defined.

Then the following function is a query($get_count = FALSE) which actually makes use of the $get_count variable which I would imagine will always be false since no other query() function has that parameter (and will break the whole thing since the base class defines query() without parameters.)

Note that the compute_fields() is probably trying to use $this->get_count_optimized and thus the query() function should too, methink.

Shall I continue?

tsphethean’s picture

 

Comment#28

tsphethean CreditAttribution: tsphethean commented 
Version:6.x-2.8» 6.x-2.16
Status:Needs work» Needs review
FileSize
653628-28-views-plugin_method_declarations.patch6.04 KB
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View

A little sad to be patching 2.16, but came across these warnings when doing a PHP 5.4 upgrade on an old site.

I've gone through the patch from #13 and manually applied what is outstanding from the latest release. This should apply cleanly against 2.16, or I can re-roll for dev if needed. Don't know if this is likely to be committed given what has moved on, but the patch file might be useful for someone else...

dawehner’s picture

 

Comment#29

ajayg CreditAttribution: ajayg commented 
Issue summary:View changes
Status:Needs review» Needs work

Patch applies fine, but missing two files which require similar changes
views_handler_filter.inc
views_handler_filter_date.inc

dawehner’s picture

 

Comment#30

Gil_Gamesh CreditAttribution: Gil_Gamesh commented 

Seeing this in 7.26-1 when I activate the Calendar module.

Strict warning: Declaration of views_handler_filter_user_relationships_type::value_submit() should be compatible with views_handler_filter_in_operator::value_submit($form, &$form_state) in _registry_check_code() (line 3161 of /usr/share/drupal7/includes/bootstrap.inc).

dawehner’s picture

 

Comment#31

-Shaman- CreditAttribution: -Shaman- commented 

This is very bad seems views is not meant to run on new versions of php...

tsphethean’s picture

 

Comment#32

tsphethean CreditAttribution: tsphethean commented 
Version:6.x-2.16» 6.x-2.x-dev
Status:Needs work» Needs review
Issue tags: +php54
FileSize
653628-32-views-plugin_method_declarations.patch6.04 KB
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View

Re-rolled the patch in #28 to add an ocurrance in views_handler_filter.inc (thanks @ajayg). I can't see any problems with views_handler_filter_date.inc

@-Shaman- - views will run on new versions of PHP, there are just a few patches that need applying. We're successfully running views on PHP 5.5 with this patch and a few others applied in our build process (using drush mask to make adding patches easy)

tsphethean’s picture

 

Comment#33

tsphethean CreditAttribution: tsphethean commented 
Issue tags:-php54+php5.4
 
dawehner’s picture

 

Comment#34

hass CreditAttribution: hass commented 
Status:Needs review» Needs work
strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate($form, &$form_state) in sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit($form, &$form_state) in sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
jackalope’s picture

 

Comment#35

jackalope CreditAttribution: jackalope commented 

I applied the patch in #32 to the newest version of views-6.x-2.x-dev; without the patch, the newer version results in no errors on my sites, but with the patch, there's tons of this sort of error. Does #32 actually regress the work done in the most recent dev version of the module?

osopolar’s picture

 

Comment#37

osopolar CreditAttribution: osopolar commented 
Status:Needs work» Closed (duplicate)
Issue tags: +PHP 5.4

Marking this as duplicate of #2411093: PHP strict warnings: Declaration of ... should be compatible with ..., as this issue initially was abut the init()-functions which seems that it got fixed in views 6.x-2.x. Looking at the patches seems that what is left is the PHP strict warnings problem.

vijaycs85’s picture

 

Comment#38

vijaycs85 CreditAttribution: vijaycs85 as a volunteer and at Capgemini commented 

Though this issue is closed, the follow up deals with 6.x-3.x and this issue is about 6.x-2.x and here is the fix for #34 on top of the patch in #32


来自  https://www.drupal.org/node/653628
普通分类: