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,
I installed the module on a Drupal 7 site, I could create meta tags and they appear well in the html code. But, I could not edit or remove them: all links give an error 404 page.
After looking a bit, I identified the problem: the links "edit" or "remove" are using simplified urls while my site does not. I can manage manually, but it is not ideal. Did I missed something?
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#8 | config_edit_remove-2359623-8.patch | 1.67 KB | davidsheart02 |
Comments
Comment #1
kalanh CreditAttribution: kalanh commentedClean URL's are not too difficult to set up, and once enabled have no down side. Follow the guide here:
https://www.drupal.org/getting-started/clean-urls
In fact, there are positive SEO effects for your site. According to SEOmoz:
http://moz.com/learn/seo/url
Comment #2
hansyg CreditAttribution: hansyg commented@patch-works does @kalanh answer make sense? clean-urls can be enabled here Administer > Configuration > Search and metadata
Comment #3
patch-works CreditAttribution: patch-works commentedHello,
Thanks for tip, but some hosting do not allow the activation of clean URLs.
I also remember having had strange behavior after activating clean URLs several time after a webiste has started (thus already had content and links).
I will evaluate the option to activate clean urls for this site (seems the hosting could accept it), but as said before, I can manage manually.
Still, being able to take both situations into account would be a nice to have for the module.
Thank you for your work!
Comment #4
hansyg CreditAttribution: hansyg commentedComment #6
davidsheart02 CreditAttribution: davidsheart02 commentedThis is actually an issue with clean urls on as well. If the site is located in a subfolder it breaks. For example, if a site lives at www.mydomain.com/awesome, clicking the edit button would take us to www.mydomain.com/admin/config/search/custom_meta/edit/1 instead of www.mydomain.com/awesome/admin/config/search/custom_meta/edit/1 which would then give the 404.
The url structure of the Edit/Remove buttons should be more flexible to prevent this from occurring.
Comment #7
davidsheart02 CreditAttribution: davidsheart02 commentedI'm guessing there's a better way to do this, but one way to patch things would be to change line 66 in custom_meta.admin.inc from this:
to this:
Since the only place those are listed is on the custom_meta config screen anyways, that relative address shouldn't cause huge problems...
Comment #8
davidsheart02 CreditAttribution: davidsheart02 commentedOk. So, here's a possible patch. Using the l function which will be deprecated in 8 but is still considered standard for 7. Also updated the Cancel link on the edit form page that was suffering from the same issue as the edit and remove links.