Posted by jantoine on October 23, 2012 at 10:34pm
3 followers
| Project: | XML sitemap |
| Version: | 7.x-2.x-dev |
| Component: | xmlsitemap_menu.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Problem/Motivation
Some contributed modules extend the functionality of entities using the Entity API for retrieving entity information. These contributed modules use entity names and bundle names for generating classes and functions. This doesn't work when entity or bundle names contain illegal characters such as hyphens. The XML Sitemap Menu module generates bundle names for the 'menu_link' entity it defines using menu names. Menu names can contain hyphens.
Proposed resolution
A simple replacing of hyphens with underscores would solve this issue.
Remaining tasks
Needs Review.
Comments
#1
The attached patch replaces all hyphens in menu names with underscores when declaring entity bundles.
#2
The last submitted patch, xmlsitemap-safe-bundle-names-1821268.patch, failed testing.
#3
#1: xmlsitemap-safe-bundle-names-1821268.patch queued for re-testing.
#4
The last submitted patch, xmlsitemap-safe-bundle-names-1821268.patch, failed testing.
#5
Maybe move the str_replace before the array assignment.
<?php$text = str_replace('-', '_', $text);
?>
I'm not saying this is the correct thing to do. Dave needs to weigh in on the change.
#6
Note sure why this would help, but attempting solution proposed in #5.
#7
The last submitted patch, xmlsitemap-safe-bundle-names-1821268-5.patch, failed testing.
#8
Your change is causing the drupalPost method of the DrupalWebTestCase to not find the status and priority fields on the form. You'll need to determine why.