- Issue created by @paul_constantine
- 🇳🇱Netherlands megachriz
Unfortunately, automated testing for Drupal 7 looks like to be disabled (or I can no longer find it). What I can tell, there have been changes to Feeds to make it compatible with PHP 8.2 (see notes of the latest release → ). What I can remember from the last time I looked at the test results, is that there were some errors in modules that Feeds depend on (Job Scheduler) or integrate with (Date). I think that these errors were only PHP notices, not things that would break Feeds.
So that being said, I expect that the D7 version of Feeds should work on at least PHP 8.0, PHP 8.1 or PHP 8.2. Not sure about PHP 8.3 or newer.
I hope I can mark the D7 version of Feeds as supported again soon. Because I still need to maintain a few D7 sites for some time longer and on one of these Feeds is being used. The support would be quite minimal though, like responding to issues like this one.
If you haven't done so yet, I recommend to install the D7 security client module. Some D7 projects will still receive security support by a community effort. I plan to join the effort to get Feeds as one of these on the list. Read more about this at https://www.d7security.org/
- 🇳🇱Netherlands megachriz
I just tried to run all D7 tests on a local site on PHP 8.3.10 and I noticed the following:
- Most tests that ran were passing.
- The following tests failed:
- Fetcher: HTTP
- Mapper: File field
- Rules integration
- At some point, the test runner crashed. I think it was at about test class 36 of 46 (probably the Rules integration test). So 10 tests did not run yet.
- There were lots of deprecation notices like 'Creation of dynamic property' and 'Optional parameter $data declared before required parameter $info is implicitly treated as a required parameter'.
So this implies that there are problems with the HTTP Fetcher and with mapping to file fields on PHP 8.3.
Maybe that I run the remaining 10 tests tomorrow, now it's time for me to head to bed.
- 🇩🇪Germany paul_constantine
Hello Megachriz,
I tried some more installs. So this happened after I migrated my website from Ubuntu 16.04 LTS to:
- Ubuntu 24.04 LTS
- Ubuntu 22.04 LTS
- Ubuntu 20.04 LTSThis Errors appeared after attempting to import a node manually:
PDOException: SQLSTATE[HY000]: General error: 1364 Field 'value' doesn't have a default value: INSERT INTO {sequences} () VALUES (); Array ( ) in db_next_id() (line 2774 of includes/database/database.inc).
After I manually migrated the table "sequences" the above error disappeared and the following error appeared when manually starting an import:
PDOException: SQLSTATE[HY000]: General error: 1364 Field 'item_id' doesn't have a default value: INSERT INTO {queue} (name, data, created) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => drupal_batch:0:0 [:db_insert_placeholder_1] => a:2:{i:0;s:11:"feeds_batch";i:1;a:3:{i:0;s:6:"import";i:1;s:13:"music_artists";i:2;i:0;}} [:db_insert_placeholder_2] => 1738862491 ) in SystemQueue->createItem() (line 221 of modules/system/system.queue.inc).
After I manually migrated the table "queue", no error appeared.
These errors never appeared before when I migrated my website between 16.04 LTS installations (virtualBox environment to live servers). Only now some years later do these errors appear. Always with these two tables.
But even with no errors nothing happenes.
A loading bar appeares, moves from left to right and disappears. There was no message informing me either of a successful import, nor that there was nothing new to import. The information about the last successful import and the total number of import stayed the same.
I remember many years ago, that the file mask '/\\.xml$/' thing was something I could not get going. Only with the help of a friend who's a real developer did we get this to work. Before that I recall the same behavior as outlines in the last paragraph.
Attached is my exported feed_importer and the tables I had to manually re-import.
Have you got any ideas why this is not working anymore? Or how to enable and where to find maximum logs where I can find out what is wrong?
Regards
Paul - 🇳🇱Netherlands megachriz
I have meanwhile ran the remaining tests and these did not fail on my local install.
When I try to load your importer on a D7 test site, I get the following warnings:
- The plugin feeds_fetcher_directory_fetcher is unavailable.
- Processor: Invalid value music_artists for config option Bundle.
I see that "feeds_fetcher_directory_fetcher" is coming from Feeds directory fetcher → . I don't know if that module got PHP 8 compatibility.
Can you perhaps try if an import does work with a different fetcher? For example, with the File upload fetcher? That way we can perhaps rule out that the issue is with the Feeds directory fetcher module.
According to #2537090: Clarify differences between this module and feeds built-in fetcher → , I see that the file upload fetcher can also fetch from a directory if you enable the option "Supply path to file or directory directly".If you like me to try to replicate the issue, can you provide your importer in a feature module and add a sample file to import?
Have you got any ideas why this is not working anymore? Or how to enable and where to find maximum logs where I can find out what is wrong?
No, I don't know yet. If the errors are not in the Drupal logs, you could try if you can find any messages in the server logs. I experienced that not every error ends up in Drupal's watchdog. On my local machine I can find the server logs in /opt/homebrew/var/log/httpd/error_log. I see there why the Rules test failed, for example:
[Thu Feb 06 20:56:36.686383 2025] [php:error] [pid 9646] [client ::1:63512] PHP Fatal error: During inheritance of RecursiveIterator: Uncaught Error: Class "RulesActionContainer" not found in /Users/youri/Sites/drupal/modules/d7/wip/rules/includes/rules.plugins.inc
- 🇳🇱Netherlands megachriz
I just tried to import a simple XML file using the XML Xpath parser and that worked fine. (PHP 8.3.10)
- 🇩🇪Germany paul_constantine
Hello Megachriz,
I can now confirm that feeds (and the Feeds directory fetcher) does work with PHP 8.3.16 and is importing fine.
What bugged me, were the constant database errors that I encountered on each new Ubuntu install (24.04, 22.04, 20.04.)
Whereas in the past I used phpmyadmin to do the ex- and importing I tried using the direct terminal method of not just importing (onto mysql 8.*) but also exporting (from mysql 5.*) the datebase.
No more mysql errors. And the import works fine as well.
My learning: do not use phpmyadmin for migrating databases.
Sorry to have wasted your time and thank you very much for your input :-)
Best wishes,
Paul - 🇩🇪Germany paul_constantine
Update: found some errors after all :-(
While the import works just fine, the following errors are generated with each import:
The file permissions could not be set on public:/...
Deprecated function: Function libxml_disable_entity_loader() is deprecated in FeedsExXml->stopErrorHandling() (line 302 of /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds_ex/src/FeedsExXml.inc).
Deprecated function: Function libxml_disable_entity_loader() is deprecated in FeedsExXml->startErrorHandling() (line 289 of /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds_ex/src/FeedsExXml.inc).
Deprecated function: Creation of dynamic property FeedsState::$files is deprecated in feeds_fetcher_directory_fetcher->fetch() (line 61 of /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds_fetcher_directory/feed...).
Regards,
Paul - 🇳🇱Netherlands megachriz
Yes, I got some of these errors as well. I don't know the cause of the file permissions error, but the others are deprecation warnings. This means that some of the code will no longer work in future PHP versions, probably in PHP 9.
So it is wise to make a plan for moving off from Drupal 7 if you can, because at some point things will no longer work, unless you can keep using older MySQL and PHP versions.I' happy to merge MR's if you can confirm that these don't break things. This way there would be a tiny chance that things keep working on future PHP/MySQL versions. I say tiny, because you'll probably face similar errors in other D7 modules. That could potentially become a lot of work to maintain. Well, PHP 9 isn't here yet, so you might be good for a while.
libxml_disable_entity_loader()
is somewhat easy to fix, and I think there was already a fix for this made in 🐛 Function libxml_disable_entity_loader is deprecated on PHP8 Fixed . It looks like that this did not got into a release yet. - 🇩🇪Germany paul_constantine
Hi megachriz,
like I wrote before the import works fine with PHP 8.3.16. If you want to I will install the patch tomorrow and do some more testing.
Best wishes,
Paul - 🇩🇪Germany paul_constantine
Okay, I installed the patch ( feeds_ex-libxml_disable_entity_loader-deprecated.patch 🐛 Function libxml_disable_entity_loader is deprecated on PHP8 Fixed ) and imported a couple of nodes manually. The "FeedsExXml" errors are gone and all is working fine.
Now there is only one error from the "feeds_fetcher_directory_fetcher" remaining:
Deprecated function: Creation of dynamic property FeedsState::$files is deprecated in feeds_fetcher_directory_fetcher->fetch() (line 61 of /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds_fetcher_directory/feed...).
Best wishes,
Paul