Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello! sometimes I see in the logs the error:
Notice: Undefined index: include_images in web/modules/contrib/simple_sitemap/src/Batch/EntityUrlGenerator.php line 66
Comment | File | Size | Author |
---|---|---|---|
#15 | Details-dev-drupal842.png | 75.91 KB | Rajab Natshah |
#15 | Recent-log-messages--dev-drupal842.png | 108.35 KB | Rajab Natshah |
#11 | simple_sitemap-210--2913507-11.patch | 988 bytes | Rajab Natshah |
#7 | 2913507-7.patch | 1 KB | Rajab Natshah |
#2 | include_images-2913507-2.patch | 813 bytes | Saphyel |
Comments
Comment #2
Saphyel CreditAttribution: Saphyel at Comic Relief commentedComment #4
gbyte CreditAttribution: gbyte as a volunteer and commentedIf you ran /update.php after updating the module, all bundle config settings and entity overrides should have the setting 'include_images', which should make checking for isset() redundant. If you encounter this error after running update.php, please reinstall the module and report back if the error returns.
Comment #5
gbyte CreditAttribution: gbyte as a volunteer and commentedComment #6
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedHaving the same issue with PHP7.1
Comment #7
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedThis patch file for the latest "drupal/simple_sitemap": "2.x-dev#4febc8925dc815a41c360e94c651e6cbb88e5aa4"
Comment #8
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #10
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedDo we have to update the automated tests?
Comment #11
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedThis patch for "drupal/simple_sitemap": "2.10"
Comment #12
gbyte CreditAttribution: gbyte as a volunteer and commented@RajabNatshah Please only create patches for the dev version. We cannot patch 2.10 retroactively - this is probably why tests are failing.
Also as stated in comment #4, this error should not exist if the module has been updated properly. Please install dev version and run update.php. If the error still exists, please try to check
- if one of the simple_sitemap.bundle_settings.[entity_type][bundle] configs is missing the 'exclude_images' key. If that's the case, go to that bundle setting page and disable and reenable the sitemap for that bundle.
- If however all bundle configs are OK, probably some entity override in the table simple_sitemap_entity_override misses the key. In this case, you will have to either delete/resave the override, or disable and then reenable the entity type in 'admin/config/search/simplesitemap/entities', but bear in mind this will delete your sitemap settings for all bundles of that type and delete all entity overrides.
Comment #13
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedNoted:
I have a case when we enable the module in a profile and PHP7.1
Posted 2 patches:
As I'm using the other patch for 2.10 in a profile, which is a sub profile of another profile.
I think we could check this by:
We could test this with the standard Drupal profile to add the module in the standard.info.yml to be enabled when we install, and after the install we can check the error loges
http://cgit.drupalcode.org/drupal/tree/core/profiles/standard/standard.i...
Comment #14
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedThank you Pawel,
I'm testing this, if the schema changed we may need to change as you listed.
Comment #15
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedYou are right Pawel,
After the full test for an enable within the install process:
Both worked well and the push
Following with your comments
Comment #17
gbyte CreditAttribution: gbyte as a volunteer and commentedThis is not necessary, but adding empty check in case link array is altered with hooks. This should fix this issue as well.
Comment #18
chOP CreditAttribution: chOP commentedCan anyone provide a workaround for when we're not able to Uninstall and Reinstall this module to fix the PHP
Notice: Undefined index: include_images
I'm stuck in this awful situation where I cannot uninstall and reinstall the module, because it's a requirement of some other custom written module. We run schema updates with update.php during every release, so I have no idea why this array key is missing, but it is. The cron run logs fill up with the Notices.
Any help appreciated.
Comment #19
gbyte CreditAttribution: gbyte as a volunteer and commented@chOP Sure, just install the development version of the module and clear the cache by running update.php.
A hacky way to stay on the stable release, would be to temporarily remove the reference to this module from the other module's 'requirements' array from its .info file and then reinstalling this module.
Comment #20
kgeeraerts CreditAttribution: kgeeraerts commentedHi, I'm encountering thesame issue so I'm trying to upgrade to dev but when I try to run composer require drupal/simple_sitemap:8.x-2.x-dev, I keep getting:
" Package drupal/simple_sitemap at version 8.x-2.x-dev has a PHP requirement incompatible with your PHP version (7.1.8.0)"
Comment #21
gbyte CreditAttribution: gbyte as a volunteer and commented@KennyGeeraerts I am not sure why you are getting this, simple_sitemap does not declare a minimum version of PHP, it should always work with the PHP version required by Drupal core.
Please however open up a new issue as you don't want all subscribers to get email updates about stuff they didn't subscribe to.
Comment #22
kgeeraerts CreditAttribution: kgeeraerts commentedmondays... I had to ommit the 8.x from the composer command - non-sensical error in any case but owh well...
Update works and the warning is gone, thanks gbyte.co !