We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Routing errors when upgrading Phalcon 4 (underscore in action names)

Hi, thank you all. I have a SaaS application written with phalcon 3.4. Now I'm triying to upgrade to phalcon 4. I'm using axios. I have problem with action names which have underscore. I'm getting "404 Not Found" response. Sample post url is "http://localhost/login/captcha_renew". It's working with phalcon 3.4.

If I change the action name as captchaRenew, it's working. But I have nearly 1000 actions. It will take days to change them all. Is there an easy way to allow such action names?

Thanks for your help...

  • Open SUSE Leap 15.2
  • PHP 7.4.6
  • Phalcon 4.1.0
  • Nginx 1.16.1

Are you getting a 404 error from your server or from your app? You may just need to set up a new router rule to handle underscore actions - though I don't see why they would be causing a problem