Bulk email 'Failed to read file... /societe/177/177/pdf, 15.0.0 on Ubuntu

Hi Everybody :wave:
This was working back in 14.0.? but went wrong somewhere in 14.?? so I updated to 15 and problem remains. Third parties->prospects->search for those with a tag->tick them>select action=send by email>confirm>select the template>apply>send email. Then it posts a message with a line for each third party, they all fail:-
Failed to read file ‘/usr/share/dolibarr/documents/societe/177/177.pdf’
Failed to read file ‘/usr/share/dolibarr/documents/societe/27/27.pdf’

Result of mass Email sending:
Number selected: 2
Number ignored: 2
Number sent: 0
Extract from syslog below. Any help much appreciated. Cheers :smiley:

Feb 20 09:18:29 Dolibarr-Rich-Property dolibarr[9734]: sql=SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.address, s.datec as date_creation, s.prefix_comm, s
.status, s.fk_warehouse, s.price_level, s.tms as date_modification, s.fk_user_creat, s.fk_user_modif, s.phone, s.fax, s.email, s.socialnetworks, s.url, s.zip, s.town, s.note_priv
ate, s.note_public, s.model_pdf, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6, s.capital, s.tva_intra, s.fk_
typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.webservices_url, s.webservices_key, s.model_pdf, s.code_compta, s.code_compta_f
ournisseur, s.accountancy_code_buy, s.accountancy_code_sell, s.code_client, s.code_fournisseur, s.parent, s.barcode, s.fk_departement as state_id, s.fk_pays as country_id, s.fk_s
tcomm, s.mode_reglement, s.cond_reglement, s.transport_mode, s.fk_account, s.tva_assuj, s.mode_reglement_supplier, s.cond_reglement_supplier, s.transport_mode_supplier, s.localta
x1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo, s.logo_squarred, s.fk_shipping_method, s.outstanding_limit, s.impor
t_key, s.canvas, s.fk_incoterms, s.location_incoterms, s.order_min_amount, s.supplier_order_min_amount, s.fk_multicurrency, s.multicurrency_code, fj.libelle as forme_juridique, e
.libelle as effectif, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state, r.rowid as region_id, r.code_region as region_code, st.libelle
as stcomm, st.picto as stcomm_picto, te.code as typent_code, i.libelle as label_incoterms, s.remise_client, s.remise_supplier FROM llx_societe as s LEFT JOIN llx_c_effectif as e
ON s.fk_effectif = e.id LEFT JOIN llx_c_country as c ON s.fk_pays = c.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_for
me_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_regions as r ON d.fk_region = r.code_region LEFT JOIN llx_c_typent as te O
N s.fk_typent = te.id LEFT JOIN llx_c_incoterms as i ON s.fk_incoterms = i.rowid WHERE s.entity IN (1) AND s.rowid = 177
Feb 20 09:18:29 Dolibarr-Rich-Property dolibarr[9734]: sql=SELECT rowid, accountlogin FROM llx_societe_extrafields WHERE fk_object = 177
Feb 20 09:18:29 Dolibarr-Rich-Property dolibarr[9734]: Failed to read file: /usr/share/dolibarr/documents/societe/177/177.pdf

I have the same issue in v15.0.1 but I discovered it only happens when you have the “Attach file” field set to 1; cleaning this parameter will make it work.
In any case I suppose it is a bug.
Cheers

1 Like