Jump to content

PDF attachment issues - files cannot be read?


Recommended Posts

Hi,

 

I recently moved a shop from a .nu domain to a .dk domain. All was successful, but now we find out that the PDF attachement (with product information - for download at specific product site) cannot be opened. Error message is 'PDF document could not be read'.

 

Does anyone have an idea of what could have gone wrong? What can I do to fix this issue?

 

 

domain is phililppejse(dot)dk in the download section of each product you will find a file in the download section - it's the same issue for all. File is set to open in stead of download, but this did not solve the issue.

 

 

 

Link to comment
Share on other sites

When I go to the backoffice and look in attachments under 'catalogue' it looks like there's no files in each upload. The list is there, but when I go to edit for each file there's nothing there.

 

Then when I go to the cpanel of the shop, all the files are correctly placed in the download folder?

 

What could have happened, when I moved domain?

 

Any ideas at all? Do I really need to upload all 180 files again, without knowing what happened?

Link to comment
Share on other sites

Looks like the pdf files are not pdf files anymore. They are all broken? When I download one of the files from the folder Download and try to open it directly from my desktop, the reader says 'file is damaged and cannot be repaired'.

 

Looks like the records are all there.

 

Maybe the files weren't optimized for fast web view? Could that have given this issue? (I didn't update them, my client did, so I'm not sure about the files configuration - but I do know that it worked to begin with)

 

Thanks for replying :)

Link to comment
Share on other sites

No pdf og %pdf in the file name and no I can't open it locally, when I download through FTP.

 

I've tried to attach it here, but it says I'm not permitted to upload that kind of file (and now I wonder what kind of file it turned into :unsure: )

Link to comment
Share on other sites

  • 3 weeks later...

I have same issue with no success in resolving.

 

I created testing domain, then migrated a copy of my PS store v.1.4.4.1 and upgraded over to v.1.5.6.2.

 

After resolving missing images, I now encounter an error in the download .pdf attachments: "There was an error opening this document. The file is damaged and could not be repaired."

 
Trouble shooting steps..

 

First, I confirm .PDF files exist.

The download folder was empty.

 

Next, I uploaded the backup ‘download’ folder over to new PS.v.1.5.6.2.

Finally, I recompile templates if the files have been updated.. Then Clear Smarty cache & Autoload cache.

 

No success!

 

Anyone have solution to this?

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Hi, i have the same problem after i had to make a full backup from my local machine.

 

At first when i tried to download a pdf attachement from the website it showed PDF FAILED TO LOAD, know after proceeding with the instructions from the link http://www.digitaldisseny.com/es/blog/207-prestashop-product-attachments-corrupted that MARCIS shared the PDF files are empty, plain white pages. Did someone confrunt this issue?

Edited by ecomas (see edit history)
Link to comment
Share on other sites

  • 2 years later...

uploading attachment is throwing the error. Can anybody help me out with it ?

 

ContextErrorException in ProductOptions.php line 217:Notice: Undefined offset: 29
  1. in ProductOptions.php line 217
  2. at ErrorHandler->handleError('8', 'Undefined offset: 29', '/var/www/html/prestashop/src/PrestaShopBundle/Form/Admin/Product/ProductOptions.php', '217', array('value' => '30', 'key' => 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', 'index' => '30')) in ProductOptions.php line 217
  3. at ProductOptions->PrestaShopBundle\Form\Admin\Product\{closure}('30', 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', '30')
  4. at call_user_func(object(Closure), '30', 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', '30') in DefaultChoiceListFactory.php line 165
  5. at DefaultChoiceListFactory::addChoiceView('30', '30', object(Closure), array('ab08c594752cd9a581ebd8ee9b4612499c6122b2'), '1', nullarray(), array(), array()) in DefaultChoiceListFactory.php line 231
  6. at DefaultChoiceListFactory::addChoiceViewsGroupedBy(array('ab08c594752cd9a581ebd8ee9b4612499c6122b2' => '30'), object(Closure), array('30'), array('ab08c594752cd9a581ebd8ee9b4612499c6122b2'), '1', nullarray(), array(), array()) in DefaultChoiceListFactory.php line 130
  7. at DefaultChoiceListFactory->createView(object(ArrayChoiceList), array(), object(Closure), '1', nullnull) in PropertyAccessDecorator.php line 232
  8. at PropertyAccessDecorator->createView(object(ArrayChoiceList), array(), object(Closure), nullnullnull) in CachingFactoryDecorator.php line 197
  9. at CachingFactoryDecorator->createView(object(ArrayChoiceList), array(), object(Closure), nullnullnull) in ChoiceType.php line 508
  10. at ChoiceType->createChoiceListView(object(ArrayChoiceList), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'max_length' => null, 'pattern' => null, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'virtual' => null, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'intention' => null, 'empty_value' => object(Exception), 'label' => 'Attachments for this product:', 'read_only' => false, 'attr' => array('data' => array(array('id_attachment' => '30', 'file' => 'ab08c594752cd9a581ebd8ee9b4612499c6122b2', 'file_name' => 'Upload_.csv', 'file_size' => '236', 'mime' => 'text/plain', 'id_lang' => '1', 'name' => 'Excel File', 'description' => ''))), 'data_class' => null, 'expanded' => true, 'multiple' => true, 'empty_data' => array(), 'required' => false, 'error_bubbling' => false, 'label_attr' => array(), 'inherit_data' => false, 'compound' =

 

ContextErrorException in ProductOptions.php line 217:Notice: Undefined offset: 29
Link to comment
Share on other sites

×
×
  • Create New...