Closed (fixed)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 May 2011 at 20:26 UTC
Updated:
26 Sep 2012 at 23:51 UTC
I've got a very weird problem :
I'm using feeds for a project :
http fetcher (custom module to produce the csv)
csv parser
on localhost, everything's going fine and work well
wamp : PHP 5.2.11 / mysql 5.X / Apache 2.X
on the production server, I've got a strict warning on any page involving feeds (I mean, a node as an instance of feeds or a page of param)
PHP 5.2.17 / mysql 5.X / Apache 2.X
The immediate consequence is that the import is not working
Strict warning : Declaration of FeedsSource::instance() should be compatible with that of FeedsConfigurable::instance() dans _registry_check_code() (ligne 2811 dans D:\Apache\htdocs\veolia\includes\bootstrap.inc).
Comments
Comment #1
arnaud.ranson commentedI forgot to tell that the cache was resetted several times
Anyway, the problem no longer exists
I can't explain why ... but I close the issue because even for me, it's impossible to reproduce
Comment #2
johnbarclay commentedI can reproduce this. The problem is
feeds/includes/FeedsSource.inc -- public static function instance($importer_id, $feed_nid = 0)
has a different handle than
feeds/includes/FeedsConfigurable.inc -- public static function instance($class, $id)
Simply changing the second arg to have the same a default or no default in both cases takes care of this.
Its caused by string needing inherited methods to have same handles.
Comment #3
dqdI can reproduce this too. I have uninstalled Panels and have changed from 5.3 cgi mode back to 5.2 php mode on shared hosting space short before suddenly this error message has occured afterwards.
@johnbarclay: So did you made a hack (code change) on your installation? And can you please show your 2 lines of code for all of us? I also would like to know which of the to possibilities you took and why.
thanks in advance
Comment #4
dqdok after switching back to php5.3-cgi mode the error goes away. It seems to be a dependend issue under different php5.x versions. Maybe feeds is optimized for php 5.3?
Comment #5
dqd+critical because users who run drupal in php5.3 cgi mode for development and want to switch back for site release and better production site performance can have issues with it. Most shared hosters support cgi mode under php 5.3 and non cgi mode under lower 5.x version of php only.
Comment #6
dave reidSorry, but that's a complete abuse of the critical priority. It's just a warning that we can fix but doesn't prevent the module from working completely. The import is not working because of something else, not because of the strict error.
Comment #7
dqdSorry for that. It was not my intension to give it a higher priority rather than to warn users using this road. My understanding of critical was if an error occures on frontpage frequently and is higher leveled than a notice. It even occures when feeds is enabled only and not in use. My intension was not about the import which is not working for the thread starter rather than for the repeating error on frontpage which seems to me more problematic than a index warning.
Thanks for clearifying and sorry for my missleading priority change.
kind regards
Comment #8
dqdThanks for fixing it, Dave.
Awesome module, by the way. And I can submit that the import works even with the error.
greetings from Berlin
Comment #9
dqdI hate talking to myself :) but ok, we all haven't enough time. I absolutely feel that. To be a little bit more positive, here is the exact code change for all who may wanna try to prevent the error warning popping up again and again. I hope Dave has some time to put this in the next dev shot, so we don't need to remember our hack after updating.
Warning: This is a manual code change in the module folder without a long testing phase from more than 2 users and will be lost after updating! I only can confirm that it works over here.
It resets the second argument rather than just using the default $id. Like mentioned above from johnbarclay, there are two possibilities. Thanks to him for pointing to the right direction. If it breaks something else later on, we try the other way around. Therefore we should better change the second argument in code line 52 back to
first and then change the second argument somewhere else to the default $id :
Summary: Try the first OR the second change ONLY and go ahaed working on your site development. The error warning from the thread start will not be there no more. But if feeds start to behave unlikely later on you may try the other way around. For me the second worked better. The first has turned out an error with editing in views.
For the tired, beware the curved bracket. There should be an opening one (only ONE!) after, like it was before. :)
Comment #10
dave reidFixed the strict notice about instance() in 7.x-2.x and 6.x-1.x:
http://drupalcode.org/project/feeds.git/commit/b39b547
http://drupalcode.org/project/feeds.git/commit/5b6605f
Comment #11
twistor commentedLooks like Dave forgot to mark this issue fixed. Closing since it's been done for more than a year.