Support

Home Forums Event Espresso Premium Invoice HTML Template

Invoice HTML Template

Posted: February 24, 2017 at 12:41 pm


DennisBenigno

February 24, 2017 at 12:41 pm

Hi,

I am having an issue with editing the invoice HTML template. I am doing it correctly in the editor view. I’m adding new HTML at the bottom of the “Main Content” area. However, it’s roughly 1000 lines. When I save it, the text area for every element is cleared. On the frontend, it’s broken and has what I added repeating several times.

Might be some kind of limit?

To get what I am trying to do, maybe there is a better solution. When an HTML invoice is generated I need to generate a W9 Form. I have a W9 generated in HTML, but I need to use the custom question shortcode to automatically fill in some of the fields (easy part). However, it seems like too much code is breaking it.

Memory limit or something else?


Josh

  • Support Staff

February 24, 2017 at 3:05 pm

Hi there,

There’s actually some validation that checks the shortcodes in each section when you click on Save. What might be happening is you have short code in the Main Content section that needs to be placed in one of the other sections. For example, the [ANSWER_*] can only be used in the
[ATTENDEE_LIST] section. You can check to see the shortcodes that can be used in each of the sections by clicking on the little hamburger icon to the right of each section.


DennisBenigno

February 25, 2017 at 12:11 pm

Hi Josh,

That wasn’t the issue. I would have received the error message about using the wrong tags.

I fixed the issue by compressing the HTML that I added. It was obviously a file size issue, this was a work around. Not sure if that text area has a size limit, perhaps it’s a default WP option. If you have any other ideas if not we can say this is resolved for now. Cheers.


Josh

  • Support Staff

February 25, 2017 at 1:30 pm

It wouldn’t be a file size issue (the custom templates are not saved in files, but rather into a database option). So the limit you were running into may have been the limit for that database field.


DennisBenigno

February 25, 2017 at 3:10 pm

Interested, so I tested on a WordPress post I added about 32,000 lines which is like 10x as much as what I did for the event espresso text area field and it parsed just fine.

Something to do with Event Espresso, going to dig through the database tables to see what I find. That or there is a PHP character limit somewhere.


DennisBenigno

February 25, 2017 at 7:40 pm

Still can’t find what the issue is.

Here is a video of what I am doing, http://briangarcia.me/misc/screencast_2017-02-25_21-38-17.mp4 . I’ve tested this on my local and get the same result.


Josh

  • Support Staff

February 27, 2017 at 7:58 am

Hi Dennis,

The wp_post table’s post_content field has the LONGTEXT data type. LONGTEXT is a string data type with a maximum length of 4,294,967,295 characters.

The wp_esp_message_template table’s MTP_content field has the
MEDIUMTEXT data type.
MEDIUMTEXT is a string data type with a maximum length of 16,777,215 characters.

The limit you were running into may have been the limit for that database field.


DennisBenigno

February 27, 2017 at 9:52 am

Thank you, Josh!!

The table was actually using the text data type which is a limit of 65,535 characters. Changing the data type has actually fixed the issue now.

The support post ‘Invoice HTML Template’ 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