Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with multi worded prefix in ConstStrategy. #4

Closed
ADmad opened this issue Sep 25, 2015 · 2 comments · Fixed by #7
Closed

Problem with multi worded prefix in ConstStrategy. #4

ADmad opened this issue Sep 25, 2015 · 2 comments · Fixed by #7
Labels

Comments

@ADmad
Copy link
Contributor

ADmad commented Sep 25, 2015

If you have constants like NODE_TYPE_PAGE, NODE_TYPE_BLOG etc. and you configure the behavior to use 'const' => 'node_type', the prefix list generated by ConstStratgey::listPrefixes() has NODE instead of NODE_TYPE.

Things get uglier if you have another set of constants like NODE_FOO_BAR and try use list with prefix node_foo and you get MissingEnumStrategyPrefixException.

@jadb jadb added the bug label Sep 25, 2015
@jadb
Copy link
Collaborator

jadb commented Sep 25, 2015

Yup - aware of that one - haven't worked on something to resolve it yet. I'll add it as bug since it's a current limitation.

@ADmad
Copy link
Contributor Author

ADmad commented Sep 27, 2015

In general it's not clear to me why do you try to guess/extract prefixes in strategies when the prefix that strategy is interested in is already present in config? IMHO listPrefixes() shouldn't exist at all. Each strategy is meant to provide list for just one configured prefix, so just need to check if list for the configured prefix is available.

@ADmad ADmad mentioned this issue Oct 11, 2015
@jadb jadb closed this as completed in #7 Oct 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants