You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 10, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 10, 2023. It is now read-only.
Controller not working on custom post type with underscores #124
This seems backwards to me. Instead using the class name to determine the correct template, we should use the names of the current template and its ancestors to generate a list of classes to load. Such a list of templates is already being generated in Loader.php:
Activity
matbrady commentedon Apr 12, 2019
@eduardoarandah I believe that is the best solution. #49 (comment)
eduardoarandah commentedon Apr 12, 2019
CPT with underscores is pretty standard, is there a reason for this not to be automatic ?
Can I help?
xaqrox commentedon Apr 9, 2020
Agreed that this is at least a minor bug that should be fixed. I don't have time right now to get to the bottom of it, but I tracked it to here:
controller/src/Controller.php
Lines 63 to 66 in 76a4181
This seems backwards to me. Instead using the class name to determine the correct template, we should use the names of the current template and its ancestors to generate a list of classes to load. Such a list of templates is already being generated in Loader.php:
controller/src/Loader.php
Line 137 in 76a4181