Support

Home Forums Custom Files Add-on (EE3) Customized php-files turn completely blank on website

Customized php-files turn completely blank on website

Posted: April 7, 2014 at 3:16 am


its

April 7, 2014 at 3:16 am

We are trying to customize some php-files, for example the Payment Overview page (payment_page.php). But once we upload the page to the wp-content/uploads/espresso/templates-folder, the page turns completely blank, there is nothing on the page. Even if we just change a bit of text in the php-file this happens. We also tried to customize other php-files (such as the invoice template), but the same thing happens. What we are doing wrong?

Also, can anyone tell us, which file to change if we want to customize the single events pages? It seems like the themeroller pages only have colors and images, we want to custom the way date, time, price is displayed, remove the title from the top of the page etc.

Thanks in advance!

………………
WordPress 3.8.1 (Suffusion theme)
Event Espresso – 3.1.36.4.P
We recently installed the business license with all included add-ons.
http://www.internationaltheater.se


Dean

April 7, 2014 at 3:57 am

Hi,

If that is the exact folder name used, it is wrong, it should be:

wp-content/uploads/espresso/templates/

Examining your site it looks like you have added the payment_page.php to another folder inside the templates folder called “customized files”.

Obviously you may have just added it there to disable it, but if not, then it wont work. I would also be cautious about using space in file and folder names.

To customise single event pages copy the following files found in the templates folder

registration_page.php
registration_page_display.php

over to wp-content/uploads/espresso/templates/

It’s important both are copied even if you are only editing one as they are linked files. Same goes for event_list.php and event_list_display.php which controls the event list output.

Regarding the invoice template, that would go in

wp-content/uploads/espresso/gateways/invoice/

As an aside, every folder also needs a blank file called index.php

Hope that helps.


its

April 7, 2014 at 5:45 am

Hi!

Thanks, that customized files-folder was a mistake, thanks for spotting that! I removed it and uploaded the payment_page.php and an empty index.php file into the wp-content/uploads/espresso/templates/-folder. But it is still blank. What am I missing?


Tony

  • Support Staff

April 7, 2014 at 6:42 am

Hi Joshua,

Where is the original payment_page.php file located that you are copying over?


its

April 7, 2014 at 6:44 am

The original file is in the wp-content/plugins/event-espresso/templates.


Tony

  • Support Staff

April 7, 2014 at 7:52 am

So as soon as you remove the payment_page.php file the page will load?

Can you send a copy of the file to support@eventespresso.com with a reference to this thread please?


its

April 7, 2014 at 9:02 am

Yes, if I remove the customized payment_page.php from the wp-content/uploads/espresso/templates/-folder, the original payment_page.php will load. I’m sending you a copy by email.


Tony

  • Support Staff

April 7, 2014 at 9:53 am

Can you try this version please?

http://take.ms/JqAWN

If that also fails can you enable WP_DEBUG and see if any errors are thrown:

http://codex.wordpress.org/Editing_wp-config.php#Debug


its

April 7, 2014 at 10:14 am

Thanks so much! The version you sent worked perfectly. So what did we do wrong? The same thing happened with other php-files that we tried to customize. How can we fix them?


Tony

  • Support Staff

April 7, 2014 at 3:08 pm

It was actually the quotation marks in use around ‘Thank You’

Here’s yours: http://take.ms/z3Zch

Mine: http://take.ms/BeVdf

Its subtle but makes a huge difference (PHP interprets those differently) if becomes more evident when comparing using something like DiffMerge (For example – http://take.ms/yREfa). Did you copy & paste that line into the template?

Which text editor are you using? (I recommend a rich text editor such Sublime Text or Notepad++ for Windows) NOT a word processing package such as Word etc.


its

April 8, 2014 at 12:58 am

Thanks! I use the text editor on Mac.

And I’m still having problems with other pages going blank. For example, in the invoice template I simply removed a part to remove the online link (I followed these instructions:
https://eventespresso.com/topic/trying-to-remove-auto-generated-invoice-pay-online-tag/)

I’m sending a copy of the invoice file to support@eventespresso.com.


Josh

  • Support Staff

April 8, 2014 at 9:34 am

Hi Joshua,

I’d recommend using an editor for the Mac like Fraise (it’s free) and there are other good recommendations here:

http://codex.wordpress.org/Editing_Files

Generally speaking, if you edit a file and then something goes blank, that means there’s something in your code that’s throwing an error. Sometimes it’s something as simple as a missing bracket, a mistyped quote mark, or a missing semi-colon at the end of a line. You can debug your broken code by setting WP_DEBUG to true in the wp-config.php file:

http://codex.wordpress.org/Editing_wp-config.php#Debug


its

April 9, 2014 at 8:09 am

Thanks, we tried using fraise, but it doesn’t make any difference. And we really didn’t change anything else but removed a line of text just as suggested in https://eventespresso.com/topic/trying-to-remove-auto-generated-invoice-pay-online-tag/)


Josh

  • Support Staff

April 9, 2014 at 8:12 am

What does the error message say when you turn on wp-debug?


Tony

  • Support Staff

April 9, 2014 at 8:26 am

I tested the template file you sent and found no issues.

However it is not clear within the thread you linked that you also need to copy the full Invoice directory to that location. I’m guessing you currently have just the template.php within wp-content/uploads/espresso/gateways/invoice/

So copy event-espresso/gateways/invoice/ to wp-content/uploads/espresso/gateways/

Then modify the template in that new location.

This is so that Event Espresso does not overwrite your modifications when we release updates.

The support post ‘Customized php-files turn completely blank on website’ 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