IMAmuseum / tap-cms

Authoring tools for the TAP mobile application software platform, built on top of Drupal. Learn more about the project at TAPintoMuseums.org.
https://github.com/IMAmuseum/tap-cms/wiki
GNU General Public License v3.0
24 stars 8 forks source link

After one succesfull download of a tour bundle, later ones fail #38

Open hannolans opened 11 years ago

hannolans commented 11 years ago

When I create a tour I can succesfully download a tour bundle. After the first time I still get a progress bar but then at the end 'An error occurred'. Probably because the file name already exists?

hannolans commented 11 years ago

Tested and this doesn't happen when you first delete the bundle attachment (part of a tour node) manually by editing the node before creating a new bundle.

Debugged further and it is caused by this if statement:

// If we have a stale tmp file delete it
if (file_exists($path)) {
    unlink($path);
}

If you disable unlink($path), it doesn't fail:

// If we have a stale tmp file delete it
if (file_exists($path)) {
//    unlink($path);
}
kjaebker commented 11 years ago

Could this be a permission issue on the file that was originally created?

Ambrosiani commented 11 years ago

ah – I ran into this problem as well.

Ambrosiani commented 11 years ago

specific error message (this is the first bundle after changing the name of the node, so at least I get the bundle):

Strict warning: Only variables should be passed by reference in tap_preprocess_tap_tourml_asset() (line 68 of /Applications/MAMP/htdocs/tap/sites/all/modules/tap-cms/modules/tap/tap.templates.inc). Strict warning: Only variables should be passed by reference in tap_preprocess_tap_tourml_multipart_asset() (line 135 of /Applications/MAMP/htdocs/tap/sites/all/modules/tap-cms/modules/tap/tap.templates.inc). Strict warning: Only variables should be passed by reference in tap_preprocess_tap_tourml_asset() (line 68 of /Applications/MAMP/htdocs/tap/sites/all/modules/tap-cms/modules/tap/tap.templates.inc). Strict warning: Only variables should be passed by reference in tap_preprocess_tap_tourml_multipart_asset() (line 135 of /Applications/MAMP/htdocs/tap/sites/all/modules/tap-cms/modules/tap/tap.templates.inc).

karnold commented 11 years ago

Ambrosiani, are you running php 5.3? these errors are typical when running on php 5.2

Ambrosiani commented 11 years ago

hi, I'm running php 5.4.4 (on MAMP 2.1.1). Any specific php setting I should try out?

karnold commented 11 years ago

try downgrading to php 5.3

Ambrosiani commented 11 years ago

OK, I'll try that and get back to you!

Ambrosiani commented 11 years ago

hmm, php 5.3 seems to cause a lot of conflicts with the underlying modules. I'll keep experimenting a bit and just disregard this problem at the moment.

edit: never mind, cacheing was the problem. With php 5.3.14 bundle exporting works without throwing error messages.