The following errors appear on a beta6 distro version of the site:

Notice: Undefined index: fields in cod_sponsors_exhibits_views_default_views_alter() (line 73 of /srv/bindings/37bdd0e60a864abc871d800493cac25e/code/profiles/cod/modules/contrib/cod_support/cod_sponsors/modules/cod_sponsors_exhibits/views/cod_sponsors_exhibits.views.inc).
Warning: array_merge(): Argument #2 is not an array in cod_sponsors_exhibits_views_default_views_alter() (line 73 of /srv/bindings/37bdd0e60a864abc871d800493cac25e/code/profiles/cod/modules/contrib/cod_support/cod_sponsors/modules/cod_sponsors_exhibits/views/cod_sponsors_exhibits.views.inc).

I have not made any adjustments to these views, and the features listing shows as in the default setting.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

japerry’s picture

Status: Active » Needs review
FileSize
887 bytes

I think this might be due to the fields not applying when the module is enabled. Not sure why that'd occur. however, I' added a patch that checks to make sure the fields exist before altering the view. Give this a shot and see if it fixes the page. I presume admin sponsors page is where this error occurs?

frederickjh’s picture

Hi!
Just wanted to chime in in say that on a brand-new install of COD Distribution version 7.x-2.0-alpha7 applying this patch to a copy of the cod_support modules in the sites/all/modules/contrib/ folder works to get rid of the error message. You need to clear the cache and may need a registry rebuild to find the patched overridden module before in uses it. I did not but after clearing the caches a couple of times and reloading the browser all was well.

@stickcenter, did this patch work for you to get rid of the error message?

Thanks for the patch japerry!

Frederick

  • japerry committed 5d0321b on 7.x-2.x
    Issue #2406001 by japerry: Supress default sponsors view error when not...
japerry’s picture

Status: Needs review » Fixed

Great to hear! Fixed in 2.0-Beta2.

frederickjh’s picture

Issue summary: View changes
Status: Fixed » Active
FileSize
179.82 KB

I have not worked on this COD site in a bit but saw today that the error message is still being logged.

So I am reopening this. I am also getting this message which seems related to the patch:

Warning: array_merge(): Argument #2 is not an array in cod_sponsors_exhibits_views_default_views_alter() (line 78 of /var/www/sites/all/modules/contrib/cod_support/cod_sponsors/modules/cod_sponsors_exhibits/views/cod_sponsors_exhibits.views.inc).

This follows the original error in the log each time:

Notice: Undefined index: fields in cod_sponsors_exhibits_views_default_views_alter() (line 78 of /var/www/sites/all/modules/contrib/cod_support/cod_sponsors/modules/cod_sponsors_exhibits/views/cod_sponsors_exhibits.views.inc).

Here is a screenshot of the recent messages log filtered to php errors:

Sorry about saying this was fixed. Not sure what happened.

frederickjh’s picture

Issue summary: View changes
FileSize
133.64 KB

Hi @japerry!

I had applied the patch by first copying the cod_support folder from profiles/cod/modules/contrib to sites/all/modules/contrib. I then applied the patch to the sites/all/modules/contrib/ copy. drush dd cod_sponsors_exhibits showed that Drupal was using the version at sites/all/modules/contrib/cod_support/cod_sponsors/modules/cod_sponsors_exhibits.

I decided to try and go back to the unpatched version by moving the patch version out of sites/all/modules/contrib/, then running drush rr to rebuild the registry. I got back the following:

$ drush rr
The registry has been rebuilt via registry_rebuild (A).                                                                                                           [success]
All caches have been cleared with drush_registry_rebuild_cc_all.                                                                                                  [success]
The registry has been rebuilt via drush_registry_rebuild_cc_all (B).                                                                                              [success]
Manually deleted 8 stale files from the registry.                                                                                                                 [success]
8 files were declared in a module's .info, but could not be found. This is probably indicative of a bug. The missing files are                                    [warning]
sites/all/modules/contrib/cod_support/cod_events/includes/views/handlers/cod_events_plugin_argument_default_event.inc,
sites/all/modules/contrib/cod_support/cod_events/includes/views/handlers/cod_events_plugin_argument_default_type.inc,
sites/all/modules/contrib/cod_support/cod_schedule/cod_schedule.entity.inc, sites/all/modules/contrib/cod_support/cod_session/views/cod_session.views.inc,
sites/all/modules/contrib/cod_support/cod_session/views/cod_session_views_handler_field_track_link.inc,
sites/all/modules/contrib/cod_support/cod_session/views/modules/taxonomy/views_plugin_argument_validate_cod_session.inc,
sites/all/modules/contrib/cod_support/cod_session/views/views_plugin_pager_session_more.inc,
sites/all/modules/contrib/cod_support/cod_sponsors/modules/cod_sponsors_exhibits/views/cod_sponsors_exhibits.views.inc.
All caches have been cleared with drush_registry_rebuild_cc_all.                                                                                                  [success]
All registry rebuilds have been completed.                                                                                                                        [success]

Watchdog log shows:

In any case this seems to have fixed the problem here. The error messages have stopped. Let me know if I can provide any more information on this issue.

God Bless!

Frederick