Hi,

First of all, thank you for creating this promising module.

I'm about to test it for a project which will incorporate links to pdf files in text area with wysiwyg. With both versions (1.2 & 1.x dev) i'm receiving this error:

Notice: Undefined variable: filemime in track_da_files_tracking() (line 518 of /srv/bindings/f9eae3d483a846d7b61ddfbbf1d5797f/code/sites/all/modules/track_da_files/track_da_files.module).
Notice: Undefined variable: filename in track_da_files_tracking() (line 518 of /srv/bindings/f9eae3d483a846d7b61ddfbbf1d5797f/code/sites/all/modules/track_da_files/track_da_files.module).
Notice: Undefined variable: filesize in track_da_files_tracking() (line 518 of /srv/bindings/f9eae3d483a846d7b61ddfbbf1d5797f/code/sites/all/modules/track_da_files/track_da_files.module).

Also:

- Not formatted (default) links to pdf files are opened in new browser tab (normal behavior) but formatted links using "http://www.domain.com/system/tdf/[file path]/?file=..." are firing up an open/save file dialog instead.
- No data is recorded and visible in tdf report tab.

Best regards.

Comments

bgoetzmann’s picture

I got the sames messages with 7.x-1.4 version, and also for the 7.x-1.x-dev version (same code at this time of writing).
After having analysing the code, I saw that the module suppose to find a corresponding record in file_managed table that is a Drupal core table. So, I've a workaround that works for me: create that record by PHP code (using Devel module for example).

Here the code I executed:

global $user;
$file = new stdClass;
$file->uid = $user->uid;
$file->filename = 'CubicMind-0.1.exe';
$file->uri = 'public://odelia-cubicmind/CubicMind-0.1.exe';
$file->status = 1;
$file->filemime = 'application/octet-stream';

file_save($file);

It permits to track the file CubicMind-0.1.exe that is in my public folder in odelia-cubicmind sub-folder.
To be complete here the link I used in a content :

<a href="http://www.odelia-technologies.com/system/tdf/odelia-cubicmind/CubicMind-0.1.exe/?file=1">Test1</a>

Cheers,

Bertrand

  • federiko_ committed cd118a9 on 7.x-1.x
    Issue #2429303 by plamenut: Error after installing and configuring...
federiko_’s picture

Hello and thanks for your contribution.
This module works with file system.
Another way to manage your files and assign tdf formatters would be to use file entity module.

Also, I've added some checks in code, so you don't get these errors even if the file is not registered in file_managed table.

federiko_’s picture

Status: Active » Closed (fixed)