Support

Home Forums Event Espresso Premium Adding Answer to Custom Question to Invoice

Adding Answer to Custom Question to Invoice

Posted: March 12, 2016 at 10:57 am


MikeC

March 12, 2016 at 10:57 am

Hi Guys,

I have a custom question in a question group of “Company Name” I need have added to the Invoice. I can see the relevant shortcodes for the Primary Registrant but I need the Company Name I’m capturing to be present here:

[PRIMARY_REGISTRANT_FNAME] [PRIMARY_REGISTRANT_LNAME]
[PRIMARY_REGISTRANT_ADDRESS]
[PRIMARY_REGISTRANT_ADDRESS2]
[PRIMARY_REGISTRANT_CITY], [PRIMARY_REGISTRANT_ADDRESS_STATE]
[PRIMARY_REGISTRANT_COUNTRY]

Many thanks in advance,

Mike


Lorenzo Orlando Caum

  • Support Staff

March 13, 2016 at 10:43 am

Hi Mike,

You can use this shortcode:

[PRIMARY_REGISTRANT_ANSWER_*]

…and then drop in the exact text for your custom question. So according to what you shared, this should work:

[PRIMARY_REGISTRANT_ANSWER_*Company Name]

Note that by exact text, that includes spacing.

Thanks


Lorenzo


MikeC

March 14, 2016 at 4:31 am

Hi Lorenzo,

Many thanks for that – it seems to have worked which is great but I now can’t seem to go back in and edit the newly tweaked Invoice. Clicking the Edit link from the list of messages just leads to a blank page. Other unedited messages are fine.

Any ideas?

Best,

Mike


Lorenzo Orlando Caum

  • Support Staff

March 14, 2016 at 4:52 am

Hi Mike,

Is it completely blank as an all white screen?

If so there may be an error occurring. Could you temporarily turn on WordPress debugging by adding the macro in the following link to your wp-config.php file?

https://gist.github.com/lorenzocaum/848801a1173be464fbe7#file-gistfile1-php

The wp-config.php file can be found in the WordPress root which is where the wp-admin, wp-content, and other files and folders for WordPress resides.

Then please try to trigger the error and you should see something on the screen. Could you copy and paste that here into a reply?

If you do not see an error on your screen, then please browse to this location using your SFTP or FTP client (e.g. FileZilla, Cyberduck):

/wp-content/debug.log

You should see an error recorded within the file. Please copy and paste that here in a reply.

Then go ahead and deactivate WordPress debugging by removing the macro that was recently added or setting it to false and saving changes:

https://gist.github.com/lorenzocaum/848801a1173be464fbe7#gistcomment-1239850

β€”
Lorenzo


MikeC

March 14, 2016 at 5:08 am

Hi Lorenzo,

A blank page is loaded http://take.ms/BD8ji

I’ll add the debug for you.

Best,

Mike


MikeC

March 14, 2016 at 5:34 am

Hi Lorenzo,

This was the info that was displayed:

WP_Widget_Recent_Comments in /wp-content/themes/nirvana/includes/theme-comments.php on line 75

Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/event-espresso-core-reg/core/EE_Session.core.php on line 398

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 577

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 578

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 579

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 580

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 581

All the best,

Mike


Tony

  • Support Staff

March 14, 2016 at 6:22 am

Hi Mike,
So is that shown on the page that was previously blank or from within the debug.log file?

‘Headers already sent’ warnings are likely being caused Because WP_Debug is enabled but would not normally cause any problems (once WP_debug is deactivated they are no longer thrown and the sessions work fine)

Was there more above this text:

WP_Widget_Recent_Comments in /wp-content/themes/nirvana/includes/theme-comments.php on line 75

That seems like half the message.

If you enable WP_Debug and navigate to the Message page that is shown blank, what do you see?


MikeC

March 14, 2016 at 8:30 am

Hi Lorenzo,

I’ve just re-run and extracted the messages from the log (below). I can see there is a fatal Out of memory error “EEH_Template.helper.php on line 349”.

[14-Mar-2016 14:17:04 UTC] PHP Notice: Undefined index: WP_Widget_Recent_Comments in /wp-content/themes/nirvana/includes/theme-comments.php on line 75
[14-Mar-2016 14:17:04 UTC] PHP Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/event-espresso-core-reg/core/EE_Session.core.php on line 398
[14-Mar-2016 14:17:04 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 577
[14-Mar-2016 14:17:04 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 578
[14-Mar-2016 14:17:04 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 579
[14-Mar-2016 14:17:04 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 580
[14-Mar-2016 14:17:04 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/my-custom-css/my-custom-css.php on line 581
[14-Mar-2016 14:17:04 UTC] PHP Fatal error: Out of memory (allocated 39845888) (tried to allocate 70023 bytes) in /wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Template.helper.php on line 349
[14-Mar-2016 14:17:05 UTC] PHP Notice: Undefined index: WP_Widget_Recent_Comments in /wp-content/themes/nirvana/includes/theme-comments.php on line 75
[14-Mar-2016 14:17:05 UTC] PHP Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/event-espresso-core-reg/core/EE_Session.core.php on line 398
[14-Mar-2016 14:17:30 UTC] PHP Notice: Undefined index: WP_Widget_Recent_Comments in /wp-content/themes/nirvana/includes/theme-comments.php on line 75
[14-Mar-2016 14:17:30 UTC] PHP Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /wp-content/themes/nirvana/includes/theme-comments.php:75) in /wp-content/plugins/event-espresso-core-reg/core/EE_Session.core.php on line 398


Josh

  • Support Staff

March 14, 2016 at 10:09 am

The error messages that you’re seeing indicate that your server is running low on memory. You can bump up the amount of memory available to your WordPress installation by following this guide:

http://codex.wordpress.org/Common_WordPress_Errors#Allowed_memory_size_exhausted


MikeC

March 16, 2016 at 8:04 am

Thanks, Josh. I know my hosting account is relatively old. Do you have any recommendations on the amount of memory needed? It feels borderline as this functionality does some time work.

Best Regards,

Mike


Tony

  • Support Staff

March 16, 2016 at 8:09 am

Hi Mike,

Your maxing out at ~40MB currently which is relatively low, I would recommend updating to at least 96MB.

You can do that by using:

define( 'WP_MEMORY_LIMIT', '96M' );

Within your wp-config.php file.

You can find more details here:

https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP


MikeC

March 20, 2016 at 12:40 pm

Hi Tony,

Memory upgraded and I’m back in action! Thanks for your help.

I notice that the Zip/Postal Code is missing from the address on the Invoice and I can find the code for this to add to the form? Any ideas? (And is there any documentation detailing all of this as I can’t find it πŸ™‚ )

Thanks in advance,

Mike


MikeC

March 20, 2016 at 12:44 pm

Actually, I’ve just spotted that the line drop-down! PRIMARY_REGISTRANT_ZIP_PC seems to have done the trick.

Thanks for your help,

Mike


Tony

  • Support Staff

March 21, 2016 at 5:36 am

Great, I’m glad your up and running again πŸ™‚

All of the messages show the shortcodes that can be used in each individual section within those dropdowns.

Just let us know if you have any further questions.

The support post ‘Adding Answer to Custom Question to Invoice’ 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