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.
Bar charts are not displayed because of missing $base_path in URLs.
Solution is to prefix drupal_get_path() with $base_path when used to build URLs:
- $path = url(drupal_get_path('module', 'tablemanager'));
+ $path = (base_path() . drupal_get_path('module', 'tablemanager'));
Tormi
Comments
Comment #1
pobster CreditAttribution: pobster commentedAh ha! Well spotted! Mind you, your reasons are slightly incorrect ;o) It's not that the base_url isn't present as it is (Drupal call 'url' http://api.drupal.org/api/5/function/url does indeed allow for this), the problem is that if you're not using clean urls then the url returned is a query string such as www.yoursite.com/basepath/?q=modules/tablemanager/misc/somecolor.png. I know this as the test site I knocked up to test this new version on requires a base_url and Tablemanager worked just fine when I tested it because I always use clean urls!
Anyways, thanks for spotting it/ fixing it - I'll roll a new release asap.
Pobster
Comment #2
tormiIt's Drupal's default setting not to use clean urls, IMHO we should always test against it;)
Anyway, thanks for the prompt answer.
Tormi
Comment #3
pobster CreditAttribution: pobster commentedComment #4
tormiSeems like You missed one case at function tablemanager_css() in commit 1.87 (DRUPAL-5--1-4)
Tormi
Comment #5
pobster CreditAttribution: pobster commentedYeah I realized after I'd already committed it (when I was updating the 4.7 release - which got updated correctly!)
I guess it's not a huge issue, I'll just update it next release.
Thanks for pointing it out though :o) Nice to know there's a community behind me!
Pobster