Support

Home Forums Event Espresso Premium Load checkout page not working, WordPress in subdirectory

Load checkout page not working, WordPress in subdirectory

Posted: June 3, 2013 at 12:34 pm

Viewing 10 reply threads


riverfest

June 3, 2013 at 12:34 pm

At first I had some issues with getting SSL set up to work with EE – I was glad to see in your docs that you recommended Better WP Security, which I had already installed before setting up my events for this year.  Correcting those settings resolved the issue of the ‘Register for this event’  link not working. Now when I view an event (using Multi-Event registration), the ‘Register for this event’  link takes me to the shopping cart page, where I can select the tickets I want (e.g. 1 adult, 2 child). It calculates the total correctly, then when I click on ‘Enter attendee information’ it displays the main homepage to my site, which is completely outside WordPress. I can see in the address bar it says

mydomain.com/?page_id=47&regevent_action=load_checkout_page  , yet all the wordpress files are in the wordpress subdirectory;

my event is at mydomain.com/wordpress/?ee=30, so the checkout page should be going to mydomain.com/wordpress/page_id=47&regevent_action=load_checkout_page.

I’m only using WordPress for the back-end of the site, so in the WordPress settings I have both the WordPress Address and the Site Address set to mydomain.com/wordpress. I tried changing the site address to mydomain.com; yet with that setting, when I tried to view an event it went to mydomain.com/?ee=30, which again displayed the main site homepage (outside WordPress).

I also tried adjusting the redirect rules in .htaccess; at one point I got to the checkout page, but then if I went to the main site homepage it went straight into WordPress.

I also tried setting the SSL Host in the WordPress HTTPS settings to ‘mydomain.com’ and ‘mydomain.com/wordpress’, yet that had no effect.

Sorry for being a bit long-winded; the basic question is “How do I force the ‘load_checkout_page’  action to stay in the wordpress directory, instead of going to the site root directory?

My site is riverdaleriverfest.org

Thanks,

Ross Diamond


Josh

  • Support Staff

June 3, 2013 at 1:14 pm

The checkout page pulls what’s stored in the database as the site URL for that part of the URL.

Did you try re-saving the permalink settings? While checking this, does the issue go away if you set WP to use the default permalink setting?


riverfest

June 4, 2013 at 12:02 pm

At first I had some issues with getting SSL set up to work with EE – I was glad to see in your docs that you recommended Better WP Security, which I had already installed before setting up my events for this year.  Correcting those settings resolved the issue of the ‘Register for this event’  link not working. Now when I view an event (using Multi-Event registration), the ‘Register for this event’  link takes me to the shopping cart page, where I can select the tickets I want (e.g. 1 adult, 2 child). It calculates the total correctly, then when I click on ‘Enter attendee information’ it displays the main homepage to my site, which is completely outside WordPress. I can see in the address bar it says

mydomain.com/?page_id=47&regevent_action=load_checkout_page  , yet all the wordpress files are in the wordpress subdirectory;

my event is at mydomain.com/wordpress/?ee=30, so the checkout page should be going to mydomain.com/wordpress/page_id=47&regevent_action=load_checkout_page.

I’m only using WordPress for the back-end of the site, so in the WordPress settings I have both the WordPress Address and the Site Address set to mydomain.com. I tried changing the site address to mydomain.com; yet with that setting, when I tried to view an event it went to mydomain.com/?ee=30, which again displayed the main site homepage (outside WordPress).

I also tried adjusting the redirect rules in .htaccess; at one point I got to the checkout page, but then if I went to the main site homepage it went straight into WordPress.

I also tried setting the SSL Host in the WordPress HTTPS settings to ‘mydomain.com’ and ‘mydomain.com/wordpress’, yet that had no effect.

Sorry for being a bit long-winded; the basic question is “How do I force the ‘load_checkout_page’  action to stay in the wordpress directory, instead of going to the site root directory?

My site is riverdaleriverfest.org

Thanks,

Ross Diamond


riverfest

June 4, 2013 at 2:26 pm

The WordPress site URL is http://www.riverdaleriverfest.org/wordpress.

I tried changing the permalink settings back to the default; this did not correct the problem I mentioned, and it caused other problems with the site. Then I change it back to ‘Post Name’ and saved it.
Yesterday a colleague who is helping with the site content and testing was able to view the event, go through all the screens and complete a transaction. Now I can’t even view an event – it just shows [ESPRESSO_EVENTS] on the page without the content. I looked in the error console with Chrome and it says
‘[blocked] The page at (url/wordpress) ran insecure content from code.jquery.com/jquery-migrate-1.1.1.min.js’
I’m using Dreamweaver to edit the site, I did a search for jquery-migrate and the only file that references it is espresso.php – it says
‘wp_enqueue_script(‘jquery-migrate’, ‘http://code.jquery.com/jquery-migrate-1.1.1.min.js’
so, I commented out this line. I also added this to my themes functions.php file to make sure WP loads the latest version of jquery:
if (!is_admin()) add_action(“wp_enqueue_scripts”, “my_jquery_enqueue”, 11);
function my_jquery_enqueue() {
wp_deregister_script(‘jquery’);
wp_register_script(‘jquery’, “http” . ($_SERVER[‘SERVER_PORT’] == 443 ? “s” : “”) . “://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”, false, null);
wp_enqueue_script(‘jquery’);
}

I looked at the WP database with PHPmyadmin, there is a field in the wp-options table named wordpress-https_unsecure_external_urls, it includes ‘http://code.jquery.com/jquery-migrate-1.1.1.min.js?ver=3.5.1″;’

I tried removing this value, yet still the same problem – I just see [ESPRESSO_EVENTS] on the page.

I did a thorough cleaning of my computer with CCleaner – still the same problem.

The site is riverdaleriverfest.org, the test event is https://riverdaleriverfest.org/wordpress/?ee=30

I’m at a loss. This needs to be up and running by tomorrow. PLEASE HELP!


Josh

  • Support Staff

June 4, 2013 at 7:00 pm

It sounds like you should go through the steps outlined here to make sure the WP URL and site URL settings, index.php, and .htaccess files are set up correctly when running WP from a subdirectory:

http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

As an aside, forcing WP to load the latest version of jQuery will typically break things, so it would be best to revert the changes that were made to the theme to make it load a newer copy of jQuery.


riverfest

June 5, 2013 at 12:43 pm

I have spent hours poring over the Giving_WordPress_Its_Own_Directory page; it doesn’t give specifics on what should be in the .htaccess files.

I found this post and followed the instructions:

http://wordpress.org/support/topic/htaccess-problem-on-subdirectory-install

So in the riverdaleriverfest.org\wordpress folder the htaccess file contains:

RewriteBase /wordpress/

RewriteRule ^index\.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /wordpress/index.php [L]

 

and in the root of riverdaleriverfest.org it has:

RewriteBase /

RewriteRule ^index\.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

 

I definitely had both the WordPress Address (‘siteurl’ in the database) and the Site Address

(‘home’ in the database) set to http://localhost.riverdaleriverfest.org/wordpress previously;

everything worked fine last year.

I created a new database, then did a complete re-install of WordPress and Event Espresso on my testing server; on that I’m back to where I was a few days ago – I can see the event page and the cart page, then when it tries to load the checkout page it goes to the homepage.

I also removed the change to make it load a newer version of jQuery.


Josh

  • Support Staff

June 5, 2013 at 1:41 pm

As long as WP has file access it will automatically update the .htaccess files for you when you go to the permalink settings page.

The index.php file in root is the one that need to be manually changed where it says:

require('./wp-blog-header.php');

to:

require('./wordpress/wp-blog-header.php');

Please note: the line number in the above code samples do not get copied into the file. Also please note, if there is another site installed on the same server at root it will not work to point the siteurl away from the /wordpress subdirectory.


riverfest

June 5, 2013 at 2:27 pm

Yes, the index.php file in root has the line

require(‘./wordpress/wp-blog-header.php’);


Josh

  • Support Staff

June 5, 2013 at 3:35 pm

Hi Ross,

I FTP’ed into the site after receiving the credentials that you sent and I don’t see how this is going to work. From what I know about running WordPress in from a subdirectory and pointing the site URL to root, it doesn’t work if there is already a website in root.

In this case I recommend sticking with keeping the WordPress part of the site in /wordpress and the static part of the site in root.

I can use the remaining minutes left in the support token to see if I can find a way to make this work, but I’m not seeing a way to do this.


Josh

  • Support Staff

June 5, 2013 at 5:09 pm

A few updates:

The registration page wasn’t working for me at all so I did the following things:

deactivated WP https
unset some options in the security plugin (under tweaks) that seemed to be breaking things
activated the Multi Event Registration add-on (the standand registration is turned off, so Multi Event Registration needs to be active for the registration to work)
I also created a new main reg page because the existing one only output the [ESPRESSO_EVENTS] shortcode

At this point while logged in I can get to the point where you select the quantity of tickets in the cart. The next page where you’d normally fill out the registration form still redirects with a URL that does not include /wordpress/. I have no idea why this is happening.

As an aside, if I’m logged out of the site and I try to register for an event, the cart page gives me an error that says:

It looks like you are attempting to refresh a page after completing your registration or your cart is empty. Please go to the events page and try again.

I have a number of test sites set up in a subdirectory and the registration process goes through as expected. I’ll share my notes with the dev team and we’ll let you know if there are any other things that can be checked.


riverfest

June 12, 2013 at 11:23 am

The final piece turned out to be an issue with my theme.
I decided to try a completely fresh install – I removed all redundant/extraneous HTML files from the main site, moved the entire WordPress directory, deleted the database, created a new database, copied all new WordPress install files, installed WordPress without any plugins, installed EE and multi-reg. I created an
event (copied manually piece-by-piece from the live site), and it worked all the way until it sends you to PayPal. Then I installed Tablepress (another plugin used on some other pages) – still worked.
This was with the Twenty-Twelve theme – I still had not installed or activated my custom theme; I did so, and the same problem we had before came back – when I click on ‘Enter Attendee Information’ it just goes to the main homepage.

So I began to rebuild my theme, starting with a fresh copy of header.php from Twenty-twelve and the header.php from my existing Riverfest theme. I was trying to use the same copy of the fonts stylesheet. I had <base href=”/”  /> and <link rel=”stylesheet” href=”/css/fontstyle.css” type=text/css”  /> in the <head> section. I just commented out the ‘base’ tag and copied fontstyle.css to the theme folder – and it works!

Viewing 10 reply threads

The support post ‘Load checkout page not working, WordPress in subdirectory’ 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