Closed (outdated)
Project:
Features Override
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2011 at 22:57 UTC
Updated:
15 Jun 2017 at 20:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cdale commentedThis may not be relevant for Drupal 7, or Views 3, but for Drupal 6 and Views 2 I believe I've found the cause of these extra items, and also a cause of #1085880: [PHP] warning: Attempt to assign property of non-object.
When views discovers the default templates, it calls $view->destory() on each discovered view object. This happens before it is passed to hook_views_default_views_alter(), which means the view object has actually had all handlers and extra stuff removed.
The following patch not only reduced the amount of differences found by features override, but also stopped the errors in the above issue.
Not sure if this is the right way to go about it, but it is working for me.
Comment #2
nedjoThanks, good sleuthing.
I wonder if we need the test for 'views'. Would calling destroy() be valid for other object types?
Comment #3
cdale commentedI honestly don't know. Given I check for the presence of the function before calling it, it may work, but, it might not also do what is expected here. I always like to practice caution when doing this kind of stuff. The question is, in a non-views object, what would a function named destory() do? I honestly don't know, which makes me think the 'views' test is needed.
Comment #4
nedjoThanks, please go ahead and apply first to D7 and then to D6.
Comment #5
nedjoThanks, applied.
Comment #7
EmanueleQuinto commentedWe tested the patch on 6.x-1.x-dev: it applies and works smoothly. Would be possible to commit to the 6.x-1.x-dev branch?
It removes PHP warnings reported in #1085880: [PHP] warning: Attempt to assign property of non-object and Open Atrium community.
Comment #8
zeip commentedDrupal 6 is no longer supported.