Use l() to generate links

gpk - May 20, 2009 - 10:50
Project:SEO Checklist
Version:6.x-1.0-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The links on the settings page are generated in a slightly weird way (sorry!) .. This probably explains #445128: Don't identify correct path. The configure links take me to URLs such as http://example.com/admin/settings/SEOChecklist?q=admin/settings/clean-urls. While this works, I don't think it is supposed to!

Should really use http://api.drupal.org/api/function/l/6 which will do the hard work for you (yes if you've not met it, that is a function whose name is a lowercase letter L!!). That function adds the ?q= if necessary.

e.g. remove the ?q= from all the $option_conf_link and change

<?php
$conf_link
="| &nbsp;<a href='$option_conf_link'>Configure</a> ";
?>

to

<?php
$conf_link
='| &nbsp;' . l('Configure', $option_conf_link)<a href='$option_conf_link'>Configure</a> ";
?>

BTW this is a v. interesting module, thanks!

#1

that0n3guy - July 20, 2009 - 21:23
Version:5.x-1.3-1» 6.x-1.0-beta3

I can also confirm that this is an issue with 6.x

#2

Volacci - August 8, 2009 - 01:09
Status:active» closed

Fixed in 2.0. Download it here: Drupal SEO Checklist

 
 

Drupal is a registered trademark of Dries Buytaert.