Controller not possible when page name contains hyphen?

Permalink
As far as I can tell it is impossible to have a controller for pages with hyphens in the name.
For example: if we have a single page called 'my-page' there doesn't seem to be a way to correctly name the controller. The documentation still refers to underscores, and during experimentation I have not been able to find a way to make the controller work with a hyphened page.
Given that hyphens are the correct way to name pages (and I think recent c5 versions add hyphens instead of underscores when page names have spaces) this seems to be a serious problem.
Using rewrites/redirects is not the answer because it will cause confusion for the client, who uses the C5 dashboard - and it is an unsatisfactory solution anyway.
Can someone show me the answer?
Have I missed something obvious?
Surely we aren't in the situation where controllers are not possible in this case...are we?

 
openly replied on at Permalink Reply
openly
We are also facing the same problem, it seems obvious that hyphens should be used as separators.

If we are missing something it would be nice to know.
LucasAnderson replied on at Permalink Reply
LucasAnderson
This sounds like it could be a bug. Are you able to accesshttp://www.concrete5.org/developers/bugs/5-4-1-1/... ?

I'll do some checking into this and if you can't submit it as a bug I can do so for you.
r1digital replied on at Permalink Reply
r1digital
I'm guessing it's a regular expression issue. Does the controller work if you user and underscore instead?
andrew replied on at Permalink Reply
andrew
We're aware of this and it's been addressed in the latest development version up on github right now.
jelthure replied on at Permalink Reply
jelthure
is there a work around for this until the next release? or could someone point me at which files to look for the fix in on github?

I know I could just change the name of the page, or create it without the hyphens but I'd rather not.
orourkedd replied on at Permalink Reply
Is this fixed in 5.5? I can't get it to work...
andrew replied on at Permalink Reply
andrew
Yeah it should be fixed in 5.5
orourkedd replied on at Permalink Reply
Figured it out! Thanks!
aghouseh replied on at Permalink Reply
aghouseh
Which was.. ? I'm running into the same issue on 5.6.0.2. I had originally created the single page as "request_a_quote.php", and the controller was being picked up properly. I renamed it to "request-a-quote.php", and now nada!
TheRealSean replied on at Permalink Reply
TheRealSean
Currently getting the same issue did you fix it?
TheRealSean replied on at Permalink Reply
TheRealSean
edit: classic case,
pull hair out, post, go back solve within a couple of minutes.

For me I had a single page with the dash in ie single-page.php

my controller was single_page.php, I renamed this to single-page.php and everthing works again.

One thing to note is I believe the dash is still treated as separator as within my controller the class name is SinglePageController, and the block SinglePageBlock

Thanks for the tips