hi - i've tested against the dev and the stable version. In both cases the pdf template simply quits getting used and when i go to check the view neither of the pdfs that have been uploaded are visible. I realize this is a repeat of http://drupal.org/node/1193986 however reopening because this is both the 6.x and 6.1 stable version.

by the way i really like this module and have done a writeup here http://blog.hsl.virginia.edu/drupalpress/views-pdf-vbo-rule-sets-thousan... am also testing now whether making the pdf's read only and owned by root instead of apache may fix this problem as a workaround

Comments

alibama’s picture

Priority: Normal » Major

wow- this gets curiouser and curiouser... i set my pdf template files to be read only, set their ownership to root, and woke up this morning to find them deleted... again. I'm setting this but to major as it is a pretty major flaw having your data deleted by a module - and it doesn't even technically seem to be possible.

alibama’s picture

i've updated to the latest views and views bulk operations and made certain that both the owner and group of the template files is now root & read only - while the process is very slow (~5 pdfs per minute) i am up to 5,000 in about a day, and it hasn't died. also installed background process

alibama’s picture

Priority: Major » Minor

sorry, am going to put this down to minor priority - although it is slow it works

alibama’s picture

Priority: Minor » Major

well i guess no one else is reading this, however here's the error message i'm getting about the view getting erased
unlink(sites/default/files/views_pdf_templates/page1.pdf): Permission denied in /var/www/vhosts/drupal.website.info/includes/file.inc on line 482.

i'm bumping this back up to major... it's majorly messed up

vishusrinivasan’s picture

Hi I can confirm the same happens to me as well, the template files gets deleted after sometime...

nico059’s picture

Version: 6.x-1.0 » 7.x-1.0-rc1

I have the same problem (D7.x-1.0-rc1). I will investigate and let you know ...

update: a patch is here: http://drupal.org/node/1230098
The problem seems to be when a template pdf is uploaded (in creating/updating your views), the template file is considered by drupal as a temporary file, and is deleted by drupal when a "garbage collector" occures.
It's commited on 7.x-dev but i prefere to stay on the rc1 for stability, so, in views_pdf_plugin_display.inc I just modifiy around line 477

          if (is_object($file)) {
            $file_name =  basename($file->destination, '.pdf');
            $form_state['values']['template'] = $file_name;          
          }

to become:

          if (is_object($file)) {
            $file_name =  basename($file->destination, '.pdf');
            $form_state['values']['template'] = $file_name; 
            $file->status |= FILE_STATUS_PERMANENT;  // ****** New line from 7.x-dev ******
            $file = file_save($file);  // ****** New line from 7.x-dev ******
          }

For testing:

  • I apply this patch,
  • I remove my template first in my view (to be sure to remove all references in drupal DB about temporary template file) ,
  • and re-update my template

I'll test that and let you know if I got the error ...

Musicious’s picture

This is happening to me too... will try this solution, as it seems reasonable. Will repor back.

Very cool and usefull module.

Musicious’s picture

Patched the file but it is still happening to me. What a nightmare.

I wish this module was being supported as it seems great.

farald’s picture

Patch worked for me.

Remember that you will have to save the file again for this to work, so that the file gets the new settings. Patch, wait for it to perish, then add it again. :)

Musicious’s picture

I have done that a few times after patching.

Sorry about my little moan in the above post as well.

I have just uploaded the files to the pdf template folder via ftp so I'll see if that makes a difference.

Ii will report back. Cheers.

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)

Did the patch solve the problems? Could the patch be moved to RTBC for 7.x-1.x?

alibama’s picture

Seems to be working - thanks for the patch nico059 = RTBC - also is hunziker still on this project?

lsolesen’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

This is implemented in the newest 7.x-1.x-dev.

lsolesen’s picture

Issue summary: View changes

added some additional information