Error: Call to a member function label() on null in Drupal\simple_sitemap\Form\CustomLinksForm->validateForm()

Created on 29 November 2023, 6 months ago
Updated 16 December 2023, 6 months ago
  1. After installing the module, go to /admin/config/search/simplesitemap/custom.
  2. Try saving the configuration, it gets saved correctly. save success
  3. Now add a new Sitemap.
  4. Go back to Custom links page under Inclusion tab and try to save the configuration.
  5. Error: Call to a member function label() on null in Drupal\simple_sitemap\Form\CustomLinksForm->validateForm() (line 118 of C:\xampp\htdocs\drupal10\modules\contrib\simple_sitemap\src\Form\CustomLinksForm.php).
🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇮🇳India swapbach

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @swapbach
  • Status changed to Postponed: needs info 6 months ago
  • 🇩🇪Germany gbyte Berlin

    Please test the development version - bug reports must be opened against the dev version of the module.

    While you are at it, could you please find a reproducible way of getting this bug on a fresh installation of the module?

    Thanks!

  • 🇮🇳India swapbach

    I installed dev version of the module on the fresh standard Drupal 10.0.0 version and I get different error this time.

    Steps to reproduce the issue:

    1. After installing the module, go to /admin/config/search/simplesitemap/custom.
    2. Try saving the configuration, it gets saved correctly.
    3. Now add a new Sitemap.
    4. Go back to Custom links page under Inclusion tab and try to save the configuration.
    5. Page breaks and below error is shown in the recent logs:
      Error: Call to a member function label() on null in Drupal\simple_sitemap\Form\CustomLinksForm->validateForm() (line 118 of C:\xampp\htdocs\drupal10\modules\contrib\simple_sitemap\src\Form\CustomLinksForm.php).
  • Status changed to Active 6 months ago
  • Assigned to gbyte
  • 🇩🇪Germany gbyte Berlin

    I could reproduce the problem - will have a look shortly.

    • gbyte committed 9e60e40b on 4.x
      Issue #3404860 by swapbach, gbyte: Getting Error message on saving...
  • Issue was unassigned.
  • Status changed to Fixed 6 months ago
  • 🇩🇪Germany gbyte Berlin

    Please test and get back to me.

  • 🇮🇳India swapbach

    Issue which I reported on fresh Drupal installation is fixed now.

    Thank you for that.

    However when I tried the same dev version module in my existing site, its not working somehow. Original error messages which I reported, are still there. I don't see the textboxes for the sitemaps on this page. Can you please help in getting to know what could be the issue here.

  • Status changed to Active 6 months ago
  • Status changed to Fixed 6 months ago
  • 🇩🇪Germany gbyte Berlin

    @swapbach I've updated this ticket to reflect the issue that's been fixed. Would you mind creating a new support request ticket with the original issue you've been having?

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024