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

Print to PDF not working #27

Open
gkukovacec opened this issue Oct 29, 2022 · 21 comments
Open

Print to PDF not working #27

gkukovacec opened this issue Oct 29, 2022 · 21 comments
Assignees
Labels
question Further information is requested

Comments

@gkukovacec
Copy link

Hi,

I get this error when debug mode is turned on:

PHP Notice (8): Undefined index: container in /home/XXXXXXXXXX/public_html/glpi/plugins/pdf/inc/common.class.php at line 517

And then if fails with "Error - Failed operation" popup.

Same on assets, tickets...

GLPI version is 10.0.3
Plugin version is 2.1.0

Please help!

Thanks,
Goran

@gkukovacec
Copy link
Author

Update: print working from "Print to PDF" from left menu on open ticket, but not from Actions menu!

@yllen
Copy link
Owner

yllen commented Nov 1, 2022

There is no container index in the common.class.
Can you give me the complete error in file/_logs/php-error.log?

From Actions menu, no problem for me, i can print in PDF several computers.
Have you an error?

@gkukovacec
Copy link
Author

Hi Yllen, thanks for your feedback.

As I have said, Print to PDF works from menu on the left in the ticket, but not from action button.

Here is log entry you've requested:

[2022-11-02 10:45:58] glpiphplog.NOTICE: *** PHP Notice (8): Undefined index: container in /home/getimin5/public_html/glpi/plugins/pdf/inc/common.class.php at line 517
Backtrace :
src/MassiveAction.php:904 PluginPdfCommon::showMassiveActionsSubForm()
ajax/dropdownMassiveAction.php:53 MassiveAction->showSubForm()

Thank you!

Goran

@yllen
Copy link
Owner

yllen commented Nov 3, 2022

I made several tests and container is always defined

For ticket => all OK
MassiveAction Object ( [POST] => Array ( [action] => DoIt [container] => massformTicket

For computer => all OK
MassiveAction Object ( [POST] => Array ( [action] => DoIt [container] => massformComputer
I can't correct an issue if i can't reproduce it.

which parameters have you checked for ticketd in your pdf printing preferences(in my setting)?

@gkukovacec
Copy link
Author

Hi,
I have chosen Tickets and Items.

image

If required, I can provide access, just let me know how to PM credentials to you.

Thanks for your time!

Goran

@yllen
Copy link
Owner

yllen commented Nov 3, 2022

Massive actions are defined in your settings not in the item.
So, post your settings for ticket item

@gkukovacec
Copy link
Author

I'm sorry, I'm noob here... please let me know what exactly.
Thanks,
Goran

@yllen
Copy link
Owner

yllen commented Nov 3, 2022

image
image

@gkukovacec
Copy link
Author

I have selected Items there, too.

image

Still the same: Uncaught Exception TypeError: Argument 1 passed to Toolbox::stripTags() must be of the type string, null given, called in /home/getimin5/public_html/glpi/plugins/pdf/inc/item_ticket.class.php on line 122 in /home/getimin5/public_html/glpi/src/Toolbox.php at line 3109

@gkukovacec
Copy link
Author

gkukovacec commented Nov 3, 2022

Would you like me to send you Superadmin acconut?

@yllen
Copy link
Owner

yllen commented Nov 3, 2022

This error was already corrected.
Duplicate #26

@yllen yllen self-assigned this Nov 3, 2022
@gkukovacec
Copy link
Author

Great!

How do I apply it?

Thanks!

Goran

@yllen
Copy link
Owner

yllen commented Nov 3, 2022

You apply the correction 021a46a

@yllen yllen closed this as completed Nov 3, 2022
@gkukovacec
Copy link
Author

I have applied the correction, I can confirm that printing now works if Items are selected.

Printing from Action button still does not work, fails with the same error as in initial post.

PHP Notice (8): Undefined index: container in /home/getimin5/public_html/glpi/plugins/pdf/inc/common.class.php at line 517

Please advise.
Thanks,
Goran

@yllen yllen reopened this Feb 1, 2023
@yllen
Copy link
Owner

yllen commented Feb 2, 2023

OK, so corrected for items.
Which fields of which item do you want to print?
Can you give me the error in glpi (php-ellor.log)?

I think one of the field is missing and i must to protect it, like for ticket's item

@yllen yllen added the question Further information is requested label Feb 2, 2023
Repository owner deleted a comment from sutyagin81 Feb 13, 2023
@yllen
Copy link
Owner

yllen commented Nov 7, 2023

No news. I close

@yllen yllen closed this as completed Nov 7, 2023
@gkukovacec
Copy link
Author

gkukovacec commented Nov 7, 2023 via email

@yllen yllen reopened this Nov 10, 2023
@yllen
Copy link
Owner

yllen commented Nov 10, 2023

Can you reply to my questions?
Which fields of which item do you want to print?
Can you give me the error in glpi (php-error.log)?

@vb73
Copy link

vb73 commented Dec 11, 2023

Hi,

I seem to have almost the same problem : I can perform a ticket PDF export in the left menu, but not in the "action menu".

When I choose "Impression PDF" from the action menu :
image

I've got this popup :
image

And when I hit "Envoyer" (send), i've got a 404 error :
https://glpi.domain.com/plugins/pdf/front/export.massive.php

Log in php-errors.log :

[2023-12-11 14:14:45] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "container" in /var/web/glpi/marketplace/pdf/inc/common.class.php at line 522
Backtrace :
src/MassiveAction.php:908 PluginPdfCommon::showMassiveActionsSubForm()
ajax/dropdownMassiveAction.php:53 MassiveAction->showSubForm()
public/index.php:82 require()

In my preferences, only the item "Ticket" is ticked :
image

I'm running GLPI 10.0.10 and PDF plugin 3.0.0

I'm available if you need more information,
Vincent.

@andrepetinga
Copy link

andrepetinga commented Apr 29, 2024

Hello.
I have the same problem, using GLPI 10.0.12 and PDF plugin 3.0.0
If I use the actions button, when I press the Printo to PDF, using debug mode, the error shows up even before pressing the "Submit button.

image

PS: This was tested opening a ticket, and the plugin only has the "Ticket" option selected

@laurixia
Copy link

Any news on this last issue?
It also fails me when I select multiple items and print to pdf.

pdf1 pdf2 pdf3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants