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).

Comments

swapbach created an issue. See original summary.

gbyte’s picture

Version: 4.1.6 » 4.x-dev
Component: User interface » Code
Status: Active » Postponed (maintainer needs more info)

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!

swapbach’s picture

StatusFileSize
new70.09 KB
new58.42 KB
new141.78 KB

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. save success
  3. Now add a new Sitemap.
    new sitemap
  4. Go back to Custom links page under Inclusion tab and try to save the configuration.
    config after new sitemap
  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).
swapbach’s picture

Status: Postponed (maintainer needs more info) » Active
gbyte’s picture

Assigned: Unassigned » gbyte

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...
gbyte’s picture

Assigned: gbyte » Unassigned
Status: Active » Fixed

Please test the dev version and get back to me.

swapbach’s picture

StatusFileSize
new141.55 KB
new540.72 KB

Issue which I reported on fresh Drupal installation is fixed now.
fix worked
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.

Error message

swapbach’s picture

Status: Fixed » Active
gbyte’s picture

Title: Getting Error message on saving Custom links form under Inclusion tab » Error: Call to a member function label() on null in Drupal\simple_sitemap\Form\CustomLinksForm->validateForm()
Issue summary: View changes
Status: Active » Fixed

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

Status: Fixed » Closed (fixed)

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