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

String offset "hex" error when choosing an invoice as payment option #49

Closed
ameeker opened this issue Dec 1, 2014 · 14 comments
Closed
Assignees
Milestone

Comments

@ameeker
Copy link

ameeker commented Dec 1, 2014

Sorry if this isn't in the right place...
Using 4.7.0.dev.001, when choosing an invoice as the payment option for a ticket bundle, then clicking Finalize Registration, the next screen showed this error. Also, the invoice sent by email doesn't include the ticket information itself.

`Warning: Illegal string offset 'hex' in /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-development/core/third_party_libs/dompdf/include/style.cls.php on line 1418

Warning: Illegal string offset 'hex' in /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-development/core/third_party_libs/dompdf/include/style.cls.php on line 1418

Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'No block-level parent found. Not good.' in /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-development/core/third_party_libs/dompdf/include/inline_positioner.cls.php:38 Stack trace: #0 /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-development/core/third_party_libs/dompdf/include/frame_decorator.cls.php(546): Inline_Positioner->position() #1 /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-development/core/third_party_libs/dompdf/include/inline_frame_reflower.cls.php(37): Frame_Decorator->position() #2 /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-development/core/third_party_libs/dompdf/include/frame_decorator.cls.php(556): Inline_Frame_Reflower->reflow(NULL) #3 /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-development/core/third_party_libs/dompdf/include/page_frame_reflower.cls.php(138): Frame_Decorator->reflow() #4 /home1/ in /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-development/core/third_party_libs/dompdf/include/inline_positioner.cls.php on line 38`

@nerrad
Copy link
Contributor

nerrad commented Dec 1, 2014

Hi Angie, this is a GREAT place to post stuff like that! Thanks :)

@nerrad nerrad added this to the 4.7.0 milestone Dec 1, 2014
@nerrad nerrad assigned nerrad and tn3rb and unassigned nerrad Dec 1, 2014
@ameeker
Copy link
Author

ameeker commented Dec 1, 2014

Thanks. It affects anytime you're choosing to download or view the PDF. If you view the "Full Complete Order Verification" link, that page displays all the information fine. But if you click on Download PDF there, or at the bottom of the checkout page, it produces that error. I tried replacing the DomPDF files with the latest version, but that didn't help.

@nerrad
Copy link
Contributor

nerrad commented Dec 1, 2014

We have some potential fixes being merged across branches today that may fix this issue. Can you re pull and try again tomorrow? Also if you could verify if this happens on either alpha (4.6.0) or bet( 4.5.0 ) that'd be awesome too.

Thanx!

@ameeker
Copy link
Author

ameeker commented Dec 2, 2014

Hi Darren,

I was using the development branch. The "About" section in the settings says 4.7.0.dev.001. I'll try again today with the Alpha branch.

Angie

@ameeker
Copy link
Author

ameeker commented Dec 2, 2014

Ok I just tried it again with alpha 4.6.o and still have the same issue.

`
Warning: Illegal string offset 'hex' in /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-alpha/core/third_party_libs/dompdf/include/style.cls.php on line 1418

Warning: Illegal string offset 'hex' in /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-alpha/core/third_party_libs/dompdf/include/style.cls.php on line 1418

Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'No block-level parent found. Not good.' in /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-alpha/core/third_party_libs/dompdf/include/inline_positioner.cls.php:38 Stack trace: #0 /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-alpha/core/third_party_libs/dompdf/include/frame_decorator.cls.php(546): Inline_Positioner->position() #1 /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-alpha/core/third_party_libs/dompdf/include/inline_frame_reflower.cls.php(37): Frame_Decorator->position() #2 /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-alpha/core/third_party_libs/dompdf/include/frame_decorator.cls.php(556): Inline_Frame_Reflower->reflow(NULL) #3 /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-alpha/core/third_party_libs/dompdf/include/page_frame_reflower.cls.php(138): Frame_Decorator->reflow() #4 /home1/ameeker/public_html/ohiogeo/wp in /home1/ameeker/public_html/ohiogeo/wp-content/plugins/event-espresso-core-alpha/core/third_party_libs/dompdf/include/inline_positioner.cls.php on line 38`

If it would be helpful, I can let you in on the site.

@nerrad
Copy link
Contributor

nerrad commented Dec 2, 2014

Thanks for verifying on 4.6.0. At the moment its not necessary to have access on the site you are experiencing this. If we are unable to reproduce someone will contact you via this ticket. Thanks for reporting back your findings!

@nerrad
Copy link
Contributor

nerrad commented Dec 3, 2014

Hi Angie,

We're still trying to get to the bottom of this. Some of our team are able to reproduce, some of us can't, and it's proving to be a difficult bug. Dompdf is a third party library and it's proven to be a pain to work with sometimes, but unfortunately its the best option out there currently for an open source library we can bundle with EE core.

Anyways, something else you can try (besides pulling the latest ;) ) Please verify you have the mbstring php module installed, enabled and configured on the server you are testing on.

@nerrad
Copy link
Contributor

nerrad commented Dec 3, 2014

Hi Angie,

We finally traced this down to being a theme issue. If a theme injects its styles/scripts in a non-wp-friendly fashion then generated pdfs break because of unexpected css. We recently pushed some code that basically clears out all styles and scripts before generating html/pdf receipts/invoices. The fix is on beta, alpha and dev. Can you re pull and see if it fixes for you please?

@joshfeck
Copy link
Contributor

joshfeck commented Dec 3, 2014

Hi Angie,

Can you let us know what theme was active on your test site when you saw the error? Thanks.

@nerrad nerrad assigned nerrad and unassigned tn3rb Dec 3, 2014
@ameeker
Copy link
Author

ameeker commented Dec 3, 2014

I tried it again with both alpha and the dev branches (around 5:30PM EST) and still got the error. I am using Genesis with the Minimum Pro child theme. I also switched the theme to 2012 and still got it. I asked Hostgator this morning to confirm that mbstring was installed and configured on this server and they said it was.

@ameeker
Copy link
Author

ameeker commented Dec 4, 2014

Ok I tried it with the beta branch and the invoice is generated without the error above.

Also (and I don't think this is a bug, I think it's something you know). The Stripe plugin doesn't work with beta, but it does with alpha and dev.

@nerrad
Copy link
Contributor

nerrad commented Dec 4, 2014

Stripe isn't expected to work with beta. It requires 4.6.0 or greater.

The generated invoice error you are reporting on beta is not something we've seen yet.

Another query. Are you switching back and forth between alpha and beta and dev with the same database? If so, that WILL cause issues, because there's some significant changes in the codebase and db structure between beta and alpha. So to rule that out as a factor.

  1. Start with a fresh wp install (and database).
  2. Activate Event Espresso Beta (4.5.0.beta.+) on the site.
  3. Try a transaction and then view the resulting invoice.
  4. Install Alpha (going UP a version to alpha is okay, its going DOWN from alpha to beta where the db issues will happen) (there likely will be a migration step).
  5. Retry loading the invoice and see if there are any issues.

@ameeker
Copy link
Author

ameeker commented Dec 9, 2014

Hi - I've tried this on a clean install and it works as expected.

@nerrad
Copy link
Contributor

nerrad commented Dec 9, 2014

Okay Angie, I suspect either:

  1. Switching from beta to alpha and back (if occured on the install you experienced issues with) would have caused issues with the db.

or

  1. The invoice templates in the new system introduced in beta on your old system had old formatting that breaks with recent changes (on initial install or template resets, structure is grabbed from hard coded files that define the defaults... thereafter all messages templates are retrieved, saved to the db).

Since we're not experiencing this issue anymore I'm going to close this ticket.

@nerrad nerrad closed this as completed Dec 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants