0

So, I already solved this before (RESOLVED: "Review your contribution" returns a 404 after it worked before on CiviContribute Member Contribution page), but it seems to have come back with a minor vengeance. WordPress 5.9.3, CiviCRM now 5.48.0. I did an extension update of Stripe this weekend which had issues. The resolution there was to change the old base page of 'crm' (last time this happened, I did that because someone probably me accidentally deleted the blank civicrm WordPress page) was changed to a new base page of 'civicrm' so it was back to the default name. Oddly, while that fixed the Stripe payment processing contribution page (and may have broken events, not sure) that caused URLs to use civicrm-2, which turned out to be because the original base page was chosen as Welcome at install time way back when because that's the only page that was there, which I guess updated the post_name to civicrm, so the new civicrm got -2 added to it? Would be nice to be able to edit that within WordPress, but I guess that's what phpMyAdmin is for. In any event, I cleared out all old civicrm pages, flipped the base page to a temporary one, then flipped it back to civicrm (flushing cache every time I changed that, in the unconfirmed thought that this is necessary), hoping that would do what needed to be done.

But now, every single CiviCRM URL gives a 404. Shortcodes in WordPress pages seem to work. But of course that's not going to work out too well as the original problem from before -- review your contribution returns a 404 -- is back.

But, the fix that worked before isn't working. So, what ELSE could be going on here? Does the post_name not matter so much as ... something else?

The website is https://members.marylandtesla.com. Try to become a member and you get a 404 on the review contribution step. The upcoming events (which the Civi event widget isn't actually showing a new test event while it does show up with a shortcode in a page, not sure if that's a clue) all give 404s too unless I use specific shortcodes.

So far just typing this up hasn't given me any more ideas to see what's going on. Help?

Here's the base page config to prove it's there:

base page config

Thanks.

Michael

9
  • 1
    This is an odd url format: https://members.marylandtesla.com/index.php/become-a-tesla-club-member with both index.php and the clean page name. Check that clean urls are configured properly (docs.civicrm.org/sysadmin/en/latest/integration/wordpress/…) and that .htaccess doesn't have some weird rewrite rule.
    – Demerit
    May 11 at 23:58
  • That become-a-member page is a WordPress page with a shortcode. That part displays, but the Review Contribution then uses the /index.php/civicrm/... URL format which gives a 404. This is the default configuration. My permalink setting is default, /index.php/%year%/%monthnum%/%day%/%postname%/. Changing that breaks just about everything, I found out before. The test-drive straight contribution link is members.marylandtesla.com/index.php/civicrm/contribute/transact/… . This all worked before. .htaccess files look to be default too, nothing weird that I can see. May 12 at 0:49
  • Now that the reason I tried to switch back to the default 'civicrm' base page has been resolved (thanks to Matt Wire), I flipped that back to 'crm,' tried to restore the post_title of the original Welcome page back to civicrm and the attempted new base page back to civicrm-2 in case there's something else hardcoded there, and ... still get 404s on any /index.php/crm/ URL. May 12 at 14:02
  • Enabled some WordPress debug plugins and made some progress. Not getting 404s any more at least. However, going to the system status page gives me a blank page where I was expecting to see various items (including the Stripe web hook update I need to resolve that way). Seeing a whole bunch of this error in the plugin debug output (which I could not find anywhere else): Document is empty in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Menu.php on line 95. Haven't found anything else about that yet. May 12 at 23:58
  • Enabled some WP debugging, and based on this query: SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND (wp_posts.ID = '0') AND wp_posts.post_type = 'page' ORDER BY wp_posts.post_date DESC it does seem like CiviCRM's hook to process requests isn't working here. But why? What else is needed beyond setting the base page and clearing the cache? May 13 at 14:08

1 Answer 1

1

So, I missed the part in the documentation that says you should really have AllowOverride not set to None in the Apache http configuration file for .htaccess. I went and did a fresh install (preserving everything via backup of course) and ran into some similar errors there just when trying to set my permalink structure to just %post_name%. Still running into a weird issue with CiviCRM system status page not displaying, and the Stripe payment text field is like a pixel high now (no idea how that one happened yet), but my 404 error has been resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.