Error when clicking the TRACKS menu item:

spydmobile - November 27, 2006 - 01:12
Project:Track
Version:4.7.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:Gaby
Status:active
Description

warning: Division by zero in /home/external/public_html/modules/track/track.module on line 394.

#1

spydmobile - November 27, 2006 - 01:16
Version:HEAD» 4.7.x-1.x-dev

This issue is with 4.7.x-1.x-dev NOT head - sorry....

#2

jns - November 28, 2006 - 01:36

I'm getting this message too. It appears that the module is not reading the GPX file. The file was uploaded because I've confirmed it's in my files directory.

I got an error message saying the file could not be read when I uploaded it.

Also, I see the following in my tracker page: "undefinedt=tsssssssssssssssss."

#3

lenkkivihko - December 2, 2006 - 18:30

I think I'm having the same issue. I try to describe it a bit more...

1) At localhost all works
2) When installed on hosted server Track module does not seem to work.

Does not work =
1) Filedupload works - as the GPx files can be located at 'files' directory
2) the 'track' table gets created, but remains empty
3) the division by zero and undefinedt=tsssssssssssssssss not found -errors can be found.

In my opinion this is an issue of either of a) reading the uploaded GPX file to analyze and write to database or then b) error of writing to the database.

My skills, unfortunately, are not enough to analyze this... :-( So all I can do is to describe this a bit more...

#4

Gaby - December 2, 2006 - 18:36

Not a bug fix but actually you have to preview the node to get it in the database.
I will fix it with a smarter GPX parsing (only track actually).

#5

lenkkivihko - December 2, 2006 - 18:43

Tried to publish through preview - all seem to work fine, but then I get the error:

erreur XML : Empty document � la ligne 1
Doesn't this imply that the XML parser can not get the file read?

#6

Gaby - December 2, 2006 - 18:46
Assigned to:Anonymous» Gaby

Strange error, upload and parsing have to be clean up...

#7

Gaby - December 2, 2006 - 18:46

Can you upload GPX file please?

#8

lenkkivihko - December 2, 2006 - 18:49

Here is the GPX.

All works fine at localhost.
In hosted file upload works, but after that it does not work.

See attached one GPX. I do not think if it has to do with actual GPX as it works on local host.

AttachmentSize
2006-08-20T14-49-49Z.gpx 167.71 KB

#9

Gaby - December 2, 2006 - 18:55

I do use SportTracks GPX on my site too, and it works. So it looks like there is a server option that is not handled properly by track module.
Can you please send me a pm/mail with the URL of your website for testing purposes? I do not need create track right, just view would be ok.

I'm also thinking about a "sporttracks" plugin allowing to send track directly to a website with some XML RPC, you can suggest the feature here and on sporttracks forum... ;)

#10

lenkkivihko - December 2, 2006 - 18:56

See screenshot attached.

That's the situation after having tried to upload the file. File can be found in "files" folder, but that's all. No entry at 'track' table in database.

AttachmentSize
track_error.jpg 209.58 KB

#11

Gaby - December 2, 2006 - 18:59

Just noticed three strange characters at the begin of the XML, do you have it too? (see screenshot).

AttachmentSize
gpxscreen.png 7.89 KB

#12

lenkkivihko - December 2, 2006 - 19:07

Yes I get the 3 strange letters from download.

But when I look at local files there is no such thing.

Can this have someting to do with the "headers already sent" thing. At least with my Windows computer I have some issues with encoding and UTF-8 or ANSI encoding? Like editing some PHP files and getting errors because of strange letters at beginning.

Unfortunately I do not have Linux Pc with me right now as it never has these issues....

#13

lenkkivihko - December 2, 2006 - 19:16

Error fixed - this is about file encoding. Saved the file encoded with ANSI and all worked.

So the parser gets mixed up with the 3 first characters ala 'headers already send" -error.
So my error is not an error in the module...

Many thanks for your help! :-)
This is a great module! (see live in few days in www.lenkkivihko.fi -sorry in Finnish )

#14

masei@drupal.org - December 5, 2006 - 21:20

The module looks nice, but for me it does not work - like you said: its a problem with UTF-8 encoded files.
Is there a way to get UTF-8 files working well?

Another interesting thing would be an option to import kml files instead of gpx data.

#15

Gaby - December 5, 2006 - 22:09

It has to deal with
$form['#attributes'] = array('enctype' => 'multipart/form-data');
I will investigate soon.

For kml file format, there is no standard way to encode a track in kml. And I'm not good enough in XML parsing yet ;)

 
 

Drupal is a registered trademark of Dries Buytaert.