I have a YAML pattern I've created. I've placed it in the patterns folder wtihin the patterns module, but it doesn't show up in the list. A copy of it is below. I have spyc downloaded and it seems like it's working because it recognized the sample yaml pattern (also in the same directory).
Oh, and I've also flushed all the caches via devel.module, just in case that was a problem.
What should I be checking next?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | pvblock.yaml_.txt | 315 bytes | trevortwining |
Comments
Comment #1
trevortwining commentedComment #2
ChrisBryant commentedI just downloaded this file and made sure it was named pvblock.yaml and put it in the modules/patterns/patterns/ folder and it showed when reloading the patterns listing admin page.
The two things to check are:
1. Make sure it's named pvblock.yaml and not pvblock.yaml_
2. Make sure that the pattern is placed in the modules/patterns/patterns/ folder or a sub folder of that. ie: modules/patterns/patterns/provision/pvblock.yaml.
Also, note that you can keep your patterns in one of the following folders which are better places to keep your patterns:
/sites/all/patterns/
/sites/default/patterns/
sites/sitename/patterns/
You can also organize them with sub-folders and they will still be recognized.
This way when you update the module you don't have to worry about the files in the patterns module folder.
Let us know if that does the trick or if we need to debug further.
Comment #3
vaish commentedHi Trevor,
Could you please confirm if suggestions in #2 solved your problem?
Thanks,
Vaish
Comment #4
cdale commentedIt doesn't look in /sites/all/patterns does it? Be cool if it did though, but from looking at the code, it would not appear that it does.
Comment #5
vaish commentedIt didn't look at 'sites/all/patterns' till now. I just added and committed that line. Thanks for mentioning.
Also, small clarification regarding the other paths searched for patterns:
/sites/default/patterns/
sites/sitename/patterns/
Above two paths are mutually exclusive. Patterns will search either one or the other but not both. "Default" is actually kind of a special case for "sitename", i.e. if "sitename" folder doesn't exist then "default" is used.
Comment #6
vaish commentedChanging status to "need more info" until I hear back from Trevor.