Support

Home Forums Event Espresso Premium Strange Ticket Error!

Strange Ticket Error!

Posted: November 16, 2013 at 11:22 am

Viewing 21 reply threads


Marco Genovese

November 16, 2013 at 11:22 am

Hi,
I have created my ticket and I included in .ticket class of simple.css a background image.
– If I download in pdf the ticket, works fine in firefox;
– In safari works fine but the title of the pdf is wrong (title example: http—mysite.it-?ticket_launch=true&id=164&r_id=52874617a85ce8);
– In Chrome, the PDF is generated correctly but I cannot download it. Instead, if I remove the background image from the ticket, I can download the pdf (very strange);
– In Safari when I click the button “Download PDF” I get this message in a black screen: Unable to load plugin.

How do I solve these problems? I need the background image in the ticket.
Why, in Chrome, if the ticket has background image I can’t download it and if I remove the image I can download it?

I also tried to insert a background image into defaut ticket and the behavior does not change.

Can you help me?

This is an example of my ticket: http://aicsturitalia.it/?ticket_launch=true&id=164&r_id=52874617a85ce8.63685227&html=true

I’m a mac user

Thanks in advance,
Regards


Marco Genovese

November 18, 2013 at 3:51 am

Please, can someone answer?


Tony

  • Support Staff

November 18, 2013 at 4:05 am

Hi Marco,

I am a windows user so only have ‘Safari for Windows 5.1.7’ but had no issues with downloading the above ticket and no issues with the Event Title.

Also the same with Chrome, no issues downloading or opening.

I also tried to insert a background image into defaut ticket and the behavior does not change.

So the default ticket also breaks with a background image? or works correctly?


Marco Genovese

November 18, 2013 at 4:14 am

Hi Tony,
also the default ticket breaks with a background image.
And many of my clients who use chrome on windows computers cannot download the pdf.

Please help me solve this problem!


Tony

  • Support Staff

November 18, 2013 at 4:31 am

Unfortunately without being able to reproduce it I can only guess currently.

On Chrome what happens?
Is there any error?
Does it ask if you want to ‘Keep the files’ due to a security risk?


Marco Genovese

November 18, 2013 at 4:49 am

Apparently everything is ok. No error.
The problem occurs when, after generating the pdf I click the disk icon to save the pdf. If the ticket has a background image, the button to save the pdf doesn’t work.
If I delete the background image everything works fine.

I attach a screenshot


Sidney Harrell

November 18, 2013 at 10:01 am

I can see the problem in Chrome on your example url, but I tried to reproduce the problem on my site and even with your background image, I can download the pdf: http://eetesting.info/EE_branch/?ticket_launch=true&id=8&r_id=2-5285563860b75&html=true&&pdf=true I suspect it may have something to do with the dot in your registration id.


Marco Genovese

November 18, 2013 at 12:44 pm

Hi Sidney, thanks for the reply. Now, I’m using the default ticket where registration id is different (without dot) but still doesn’t work in Chrome. URL: http://aicsturitalia.it/?ticket_launch=true&id=67&r_id=1-525bd0d63fdc1&html=true&&pdf=true

But why doesn’t it work?


Marco Genovese

November 18, 2013 at 2:08 pm

I think I understand the problem. The problem is in the conversion from HTML to PDF.

If I paste the link on the browser Chrome: http://aicsturitalia.it/?ticket_launch=true&id=67&r_id=1-525bd0d63fdc1&html=true&&pdf=true pdf download works.
But if I do make the conversion from this page: http://aicsturitalia.it/?ticket_launch=true&id=67&r_id=1-525bd0d63fdc1&html=true (without &&pdf=true) by clicking on button “Download in Pdf” the pdf file is generated but I cannot download it.

Do you have any idea why this strange behavior?


Sidney Harrell

November 18, 2013 at 2:56 pm

I’m pretty stumped. I tried going to my html page first: http://eetesting.info/EE_branch/?ticket_launch=true&id=8&r_id=2-5285563860b75&html=true and then following the link to the pdf, and it still worked. Your link, however, when I follow the link in it to the pdf, won’t even respond to the “save as” in the contextual menu.
Can you set up a test event with the stock ticket and see if that works? If it does, then we can try changing things slowly from the stock ticket to your custom ticket and see where it breaks.


Marco Genovese

November 19, 2013 at 4:18 am

Hi Sidney,
I’m using the default ticket but still doesn’t work in Chrome.
URL: http://aicsturitalia.it/?ticket_launch=true&id=67&r_id=1-525bd0d63fdc1&html=true

This example is the same as yours, but to me it does not work.
If I remove the background image everything works fine.

Is there a way to make the conversion from HTML to PDF automatically, without switching from html page?
I solve my problem if you can do the conversion automatically


Sidney Harrell

November 19, 2013 at 10:56 am

You can try opening plugins/espresso-ticketing/espresso-ticketing.php and change line 153 to:

return home_url().'/?ticket_launch=true&id='.$attendee_id.'&r_id='. $registration_id.'&html=true&pdf=true'.$extra;


Marco Genovese

November 19, 2013 at 12:01 pm

Hi Sidney,
thank you very much! I solved by editing the espresso-ticketing.php file.
Now, in all major browsers I can save the pdf file.

But there is another small problem: In Safari, when I save the pdf file, its name is: http—aicsturitalia.it-?ticket_launch=true&id=216&r_id=528a5f6612f9a3.pdf, while in Opera browser the generated file has the name of document.pdf

Can you see this problem?


Sidney Harrell

November 19, 2013 at 5:01 pm

No, I tested it with my site in Safari for Windows (running in Wine on Linux) and couldn’t see the problem. It just gave me a normal filename.
I did some digging, and it looks like we are handing off the creation of the headers to DOMPDF, but it looks like they are doing a correct job. When I sniff the headers, I see:
Content-Disposition: inline; filename=”8-sidney-harrell.pdf”


Marco Genovese

November 20, 2013 at 1:36 am

Ok Sidney. But I’m a mac user.
Is there anyone who can test with a mac computer and see if with Safari and Opera you encounter this problem?

Thanks in advance


Sidney Harrell

November 20, 2013 at 11:48 am

Josh is on a Mac, he’ll take a look in a little bit. Can you repost a link to one of your ticket examples? All the ones above are not working anymore, and it might be helpful to get one from your server.


Josh

  • Support Staff

November 20, 2013 at 12:12 pm

Hi Marco,

The ticket link you posted appears to be no longer working. I tested downloading a ticket from my test server on Opera/Mac and it’s naming the file as expected.

Is your server OS Linux or Windows?


Marco Genovese

November 21, 2013 at 3:57 am

Hi Josh,
URL Ticket: http://aicsturitalia.it/?ticket_launch=true&id=222&r_id=528bb79502c248.53991186&html=true&pdf=true

In Safari, when I save the pdf file, its name is: http://aicsturitalia.it/?ticket_launch=true&id=222&r_id=528bb79502c248.53991186&html=true&pdf=true.pdf, while in Opera browser the generated file has the name of document.pdf

my server is OS Linux.


Marco Genovese

November 21, 2013 at 4:02 am

I’m sorry I was wrong to write the name of the generated file on Safari.
The right name that is generated when I save the pdf is: http—aicsturitalia.it-?ticket_launch=true&id=222&r_id=528bb79502c248


Josh

  • Support Staff

November 21, 2013 at 7:56 am

Hi Marco,

I checked around and this may be a bug in Safari:

http://sveinbjorn.org/safari_content_disposition_info_ignored


Marco Genovese

November 21, 2013 at 8:08 am

Um! OK Josh. Instead regarding Opera, the generated file name is document.pdf.
Do you know anything about it?


Josh

  • Support Staff

November 21, 2013 at 9:11 am

I don’t. I opened the link that you posted and the file name saved as expected in Opera version 18.0.1284.49 on Mac OSX 10.8.5

and a screenshot showing the file name that was saved:

screenshot


Marco Genovese

November 22, 2013 at 1:46 am

Ok Josh! Thanks anyway.
I’m marking this topic as solved and I’m opening a new one because I have some problems regarding data updating from the panel

Viewing 21 reply threads

The support post ‘Strange Ticket Error!’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso