Download & Extend

Xml load not working without clean URLs

Project:Units API
Version:6.x-1.0-alpha1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

In unitsapi.module, line 110 there is:

<?php
  $file
= url(drupal_get_path('module', 'unitsapi'), array('absolute' => TRUE)) .'/units.xml';
?>

But if you dont have clean urls enabled you get something like mysite.com/?q=sites/all/modules/unitsapi/units.xml in the file to load, so it causes an error.

I solve it by this way:

<?php
  $file
= str_replace('?q=', '', url(drupal_get_path('module', 'unitsapi'), array('absolute' => TRUE)) .'/units.xml');
?>

But maybe isn't the right way to fix it.

Comments

#1

Status:active» fixed

The latest -dev release should fix this. Please let me know if you see it again.

#2

Status:fixed» closed (fixed)

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

nobody click here