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

Ticket Email: Ticket Download not working. Wrong URL #6818

Closed
mariobehling opened this issue Feb 5, 2020 · 16 comments · Fixed by #6821
Closed

Ticket Email: Ticket Download not working. Wrong URL #6818

mariobehling opened this issue Feb 5, 2020 · 16 comments · Fixed by #6821

Comments

@mariobehling
Copy link
Member

The ticket download email comes with a wrong URL to something like "https://api.eventyay.com/generated/tickets/orders/tickets/pdf/9bdedaa....".

It results in a page: "Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."

Screenshot from 2020-02-05 03-13-13
Screenshot from 2020-02-05 03-12-36

@abhiandthetruth
Copy link

I will be working on it.

@abhiandthetruth
Copy link

@kushthedude i may be wrong but this appears to be server issue.

@kushthedude
Copy link
Member

@iamareebjamal

@iamareebjamal iamareebjamal pinned this issue Feb 5, 2020
@iamareebjamal iamareebjamal unpinned this issue Feb 5, 2020
@iamareebjamal iamareebjamal transferred this issue from fossasia/open-event-frontend Feb 5, 2020
@mrsaicharan1
Copy link
Member

@abhiandthetruth Are you willing to work on this?

@abhiandthetruth
Copy link

Nope it's open

@mrsaicharan1
Copy link
Member

Will fix this.

@abhiandthetruth
Copy link

abhiandthetruth commented Feb 5, 2020 via email

@mrsaicharan1
Copy link
Member

@iamareebjamal @mariobehling If the user can access the ticket via a link, it would bring us back to this issue #5608

@mrsaicharan1
Copy link
Member

mrsaicharan1 commented Feb 5, 2020

As the tickets are already attached, I don't think it's necessary for the link. If there was any error and the tickets/invoice could not be sent to the user, we could point them to eventyay.com so that they could download it.

Similar to the pre-existing system mail for TICKET_PURCHASED, the mail reflect the following text:

    TICKET_PURCHASED: {
        'recipient': 'User',
        'subject': u'Your order invoice and tickets for {event_name} ({invoice_id}) ',
        'message': (
            u"Hi, this is a confirmation mail of your tickets for the event {event_name}"
            u"<br/>Your order has been processed successfully."
            + u"<br/> You can find your Tickets and Order Invoice attached to this mail."
            u"<br><br><em>Looking forward to seeing you at the event."
            u"<br/>Login to manage your orders, tickets & invoices at {frontend_url} </em>"
        ),
    }

@iamareebjamal
Copy link
Member

The pdf link should still work. It won't lead to the above issue because of your PR itself

@mrsaicharan1
Copy link
Member

mrsaicharan1 commented Feb 5, 2020 via email

@mrsaicharan1
Copy link
Member

mrsaicharan1 commented Feb 6, 2020

https://<API_HOST>/generated/invoices/orders/invoices/pdf/1a523e55-7b46-46bd-90c1-85805384e9da/U3ZUQUZoTE/1a523e55-7b46-46bd-90c1-85805384e9da.pdf.

The current link which is being stored would've had no errors if the files had been stored in static/templates(where flask looks to serve static files like these). But all our tickets are at generated/.

@iamareebjamal What do you suggest as a plausible solution? I was wondering if we could create an exclusive generated route.

@iamareebjamal
Copy link
Member

It was already created by you only

@iamareebjamal
Copy link
Member

iamareebjamal commented Feb 6, 2020

Thinking about this again, you are right @mrsaicharan1. This can not work without it being accessible to the general public. @mariobehling It will either be available to anyone with the link or it'll throw an error for the user. There is no way to know who the user is with just the link of the PDF. So what should be done? We can either remove the link from the email and users can go to frontend to see the ticket. Or, we can allow it to be accessed by anyone who has the link

@mariobehling
Copy link
Member Author

Best would be to provide a request for the user to login. The first step is to send the tickets by email and dont send the link in the confirmation email as a quick fix. We can simply say "Your ticket is enclosed. You can also download in the My ticket section in your account."

@mrsaicharan1
Copy link
Member

@mariobehling Ticket attachments are already being sent. So that's covered. I'll add the request for the user to login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants