1

I'm intalling civicrm on backdrop cms. Setup returns that installation was succesful. I see the link in the admin bar, but when clicked, the link gives me 404 error.

If I add "?q=", links works, the page display, but any other link doesn't work.

Clean urls works fine on the site.

I'm performing a migration from Drupal 7, were civicrm was updated and functioning.

System: Backdrop 1.18.0 MySQL Database MySQL, MariaDB, or equivalent version 5.5.5-10.3.27-MariaDB-0+deb10u1 php Version: 7.3.19-1~deb10u1 (PHP information) Servidor web Apache/2.4.38 (Debian) Civicrm 5.33.1

I would appreciate any advice.

Andrés

2
  • Do clean URLs work elsewhere on the Backdrop site? Jan 18, 2021 at 16:01
  • Yes. Civicrm URLs work when I add '?q=' manually. Jan 18, 2021 at 19:32

2 Answers 2

2

If Clean URLs are working in Backdrop, but not in Civi under Backdrop, then the problem is almost certainly in civicrm.settings.php. My Backdrop/Civi sites (and also Drupal 7/Civi sites) have this snippet of code in civicrm.settings.php:

if (!defined('CIVICRM_CLEANURL')) {
  if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') {
    define('CIVICRM_CLEANURL', 1 );
  }
  else {
    define('CIVICRM_CLEANURL', 0);
  }
}

I suspect you're either missing this code, or perhaps there's something wrong with your "clean_url" variable in Backdrop.

Try replacing that with just this and let us know if it solves the problem?

define('CIVICRM_CLEANURL', 1 );
2
  • Hello, thank you for the response. I have this code on civicrm.settings.php, but changing for the last line,even so does not solve the problem. I think I could have something wrong with the definition in the database in backdrop. Jan 19, 2021 at 1:35
  • 1
    FYI this snippet has been updated to work better with Backdrop (using config management rather than variables): github.com/civicrm/civicrm-core/commit/…
    – Laryn
    Sep 11, 2021 at 14:24
1

searching in the apache2 error.log I saw:

[Tue Jan 26 14:15:46.726049 2021] [negotiation:error] [pid 16679] [client 127.0.0.1:44192] AH00687: Negotiation: discovered file(s) matching request: /home/(...)backdrop/civicrm (None could be negotiated)., referer: http://(...)backdrop/?q=civicrm&reset=1

Then I searched the web and found this post that explains that in the line

Options Indexes FollowSymLinks MultiViews

of my virtual host configuration (file /etc/apache2/sites-enabled/backdrop.conf) I should delete the word "MultiViews".

I restarted apache and civicrm links started working when I enabled Clean URLs.

Thanks,

Andrés

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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