Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from release 16 onwards: pdf merge result for Intervention doesn't show up #24185

Closed
Rendscode opened this issue Mar 10, 2023 · 6 comments
Closed
Labels
Bug This is a bug (something does not work as expected)

Comments

@Rendscode
Copy link

Rendscode commented Mar 10, 2023

Bug

The merged file doesn't show up after performing a pdf merge for object type "Intervention".
The merged file is being created and can be found in the documents folder, but that's inconvenient.

I would expect the link to the merged file being displayed below the single files.

This has to be considered as a bug, because it worked up to release 15 and still works in current versions for all other relevant object's I've tested.

Environment Version

16 and newer, including alpha of R18

Environment OS

Linux Debian 5.10

Environment Web server

Apache

Environment PHP

8.1

Environment Database

MariaDB 10.5.18

Environment URL(s)

/htdocs/fichinter/list.php?leftmenu=ficheinter

Expected and actual behavior

I would expect the link to the merged file being displayed below the single files.
Instead the file is being created and can be found in the respective subfolder of the document folder, but there's no link displayed in the window.

Steps to reproduce the behavior

Module Commerce, section Interventions:

  • Create more than one object of type interventions, including the validation, so that a pdf document is generated for each object
  • Navigate to Interventions -> list
  • Select at least two objects via the checkbox
  • Select action -> pdf merge, confirm
  • Realise the pop up message that a document has been created
  • Realise that no result link is being displayed.
  • Navigate to document subfolder and find the merged pdf

Attached files

No response

@Rendscode Rendscode added the Bug This is a bug (something does not work as expected) label Mar 10, 2023
@Timoune974
Copy link

For info
Same issue, in V17.0.1 corrected by modify fichinter/list.php

at the end of the file , i removed line 920 if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
don't forget to remove the closing bracket in line 938

@catrielr
Copy link

catrielr commented Nov 1, 2023

Same issue in version 18.0.2 /htdocs/commande/list.php
FIX: line 2776
//if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { if ($contextpage != 'poslist') {

@routmoute
Copy link
Contributor

Same in "Sales Orders" with Dolibarr v18.0.4, pdf are merged but not showing in list.

@routmoute
Copy link
Contributor

I see it's already fixed in develop branch for all lists:

if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords === '' || $nbtotalofrecords)) {

Why not use

array_key_exists('builddoc', $arrayofmassactions)

instead of

in_array('builddoc', array_keys($arrayofmassactions))

?

And how to have this fix in next release ? You need a PR @eldy ?
Thank you

@eldy
Copy link
Member

eldy commented Dec 28, 2023

No reason for in_array compared to array_key_exists. Same result.

Because PR has been merged in develop branch it will be available in next release (v19).
To have it into a maintenance release of an old version, you can make a pr into an old branch (branch v17, 18, ...)

@eldy eldy closed this as completed Dec 28, 2023
@routmoute
Copy link
Contributor

nice, I will do that. thank you.

eldy added a commit that referenced this issue Jan 2, 2024
FIX #24185: v18: display of the merged pdf lists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

5 participants