australiangreens / au.org.greens.contribpagealias

Create custom URL aliases for CiviCRM Contribution Pages
Other
0 stars 2 forks source link

Drupal 9 Compatibility #4

Open batonac opened 2 years ago

batonac commented 2 years ago

CiviCRM now works with Drupal 9. I'd love to have this functionality available. It actually installs great, but the problem is that Drupal functions drupal_lookup_path, path_load, path_save, etc are now deprecated. What would it take to get this working on modern Drupal?

Thanks

johntwyman commented 2 years ago

Hi @batonac - we're still using Drupal 7 so don't have the same interest in supporting Drupal 9 just yet. As such it's not a high priority for us.

That said, the longer term vision for the extension is for it to be compatible with Drupal 7, Drupal 8/9 and Wordpress. Starting with Drupal 8/9 support would be the logical way forward.

So no promises regarding timeline yet (sorry!). But definitely on board with the idea. Cheers!

johntwyman commented 2 years ago

@batonac I looked a bit closer and I don't think this will take a huge amount of effort. I'll have a crack at it over the coming week or two and update this issue as I go.

batonac commented 2 years ago

@johntwyman Kudos and Cheers!

johntwyman commented 2 years ago

I've refactored the extension to support multiple underlying CMS types. I've rewritten the Drupal 7 implementation to suit the new pattern.

Unfortunately URL aliases in Drupal 8/9 do not support URL parameters. So it's impossible for this extension to work in exactly the same way on that platform.

The only approach I can think of for D8/9 is to make use of the Redirect module and create 303 ("See other") redirects to the Civi contribution URL.

batonac commented 2 years ago

That makes sense. I had hoped that this plug-in provided some kind of mechanism to workaround this, like some kind of rerouting function inside of CiviCRM.

Oh well... Thanks for doing what you did here. 👏