Closed (fixed)
Project:
Feeds
Version:
8.x-3.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2024 at 10:15 UTC
Updated:
19 Dec 2024 at 11:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rudi teschner commentedComment #3
rudi teschner commentedAdditional Stacktrace
Comment #4
rudi teschner commentedComment #5
megachrizThanks for reporting. I think that the error is related to incompleted imports at the time of the update.
Only weird thing is that it says "undefined method". I would have expected the error to be something like "cannot call addMessage() on null" or something similar.
Comment #6
megachrizYou don't have patches applied to Feeds, by any chance?
Comment #7
rudi teschner commentedThanks for the fast reply. No, I don't have any patches for the feeds module applied.
I checked a different test system and there I actually get the error you mention (Error: Call to a member function addMessage() on null in Drupal\feeds\State->displayMessages()) during the cron runs. So it seems to actually be two different errors depending on whether the feed content page is accessed (i.e. /feed/8) or the cron jobs are executed.
What I wondered though ... the messenger is addressed different ways in the feed module. No clue if that has to do something at all though.
$this->messenger()
against \Drupal::messenger()
Comment #8
ajetiv1Same here, getting the following message:
Error: Call to a member function addMessage() on null in Drupal\feeds\State->displayMessages() (line 196 of modules/contrib/feeds/src/State.php).
Comment #10
megachrizI provided a possible fix in the MR. I did not test it yet though. I'm still working on the automated tests.
If you want to apply the code to Feeds 8.x-3.0-rc2, you also need to apply the code from #3479242: Error: Serialization of 'CurlHandle' is not allowed in serialize().
Comment #11
megachrizThe provided fix in the MR should be fixing this issue. 🙂
It would be great if you can test it, I plan to merge it this Thursday.
Comment #12
rudi teschner commentedI've added the changes in State.php to a system that had the messages appear every 5 minutes in watchdog - and the messages don't appear anymore
Comment #14
megachriz@rudi teschner
Cool, thanks for testing. I merged the code!
Comment #15
rob230 commentedThat patch doesn't apply. I tried applying https://www.drupal.org/project/feeds/issues/3479242 first. Are there specific commits or merge requests that need to be applied in a certain order?
Comment #16
megachriz@rob230
On top of 8.x-3.0-rc2:
And then you should be good.
Comment #17
rob230 commentedThat is what I tried. I also tried applying every commit since October, and they all apply except for this ticket. There must be something weird about the diff with binary file added which means composer can't apply it.
I've created a patch containing just the 2 required commits and no tests for anyone who wants to fix the WSOD on 8.x-3.0-rc2.
It would be good to get a new release because currently anyone who updates gets a WSOD!
Comment #18
megachriz@rob230
I wasn't aware that this issue caused a WSOD, I thought it generated only some errors on the feed page.
Thanks for creating the patch, I can see that applying the diff could be troublesome because of the binary file. I hadn't tried applying the diff with Composer, I only tried it like this:
I didn't think about that for Composer it could cause trouble.
While I think this issue doesn't affect everyone who updates Feeds (it only affects sites that have unfinished imports at the time of updating), good call on creating a new release. I can do that this Thursday.
Comment #19
megachriz@rob230
A new release has been created!
https://www.drupal.org/project/feeds/releases/8.x-3.0-rc3