getBlockTypePath bug?
Permalink
I realized that getBlockTypePath looks in the "non-core" directories first, which often makes sense. Makes it possible to override stuff without touching the core.
But it looks like the core calls the same method. For example: If you have a custom form block template, the method thinks, there's a custom form block directory and tries to load "auto.js" out of this directory!
This of course fails...
Did I miss something or is this really a bug?
But it looks like the core calls the same method. For example: If you have a custom form block template, the method thinks, there's a custom form block directory and tries to load "auto.js" out of this directory!
This of course fails...
Did I miss something or is this really a bug?
Could you restate the problem that you're getting? I don't doubt that there could be something buggy here, just want to make sure I completely understand what you're encountering.
First of all, I think you've already fixed this by fixing getBlockTypeAssetsURL. There's an optional parameter "$file"
The situation:
1. A custom template for form. The directory /blocks/form/templates exists!
2. 5.2.1
3. Edit a form --> fails!
4. block_header_edit.php calls getBlockTypeJavaScriptURL which calls getBlockTypePath to get the path to auto.js
5. getBlockTypePath finds the "non-core" directory "/blocks/form" first and tries to load "/blocks/form/auto.js" (instead of /concrete/blocks/form/auto.js"
I haven't tested it with the latest svn version, but by looking at the code, it should work..
The situation:
1. A custom template for form. The directory /blocks/form/templates exists!
2. 5.2.1
3. Edit a form --> fails!
4. block_header_edit.php calls getBlockTypeJavaScriptURL which calls getBlockTypePath to get the path to auto.js
5. getBlockTypePath finds the "non-core" directory "/blocks/form" first and tries to load "/blocks/form/auto.js" (instead of /concrete/blocks/form/auto.js"
I haven't tested it with the latest svn version, but by looking at the code, it should work..