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

[Bug] GPM keeps generating snippet files in wrong location #56

Open
hugopeek opened this issue May 11, 2015 · 3 comments
Open

[Bug] GPM keeps generating snippet files in wrong location #56

hugopeek opened this issue May 11, 2015 · 3 comments

Comments

@hugopeek
Copy link

Triple checked all the file paths and system settings, even did a fresh install, but static snippet files keep popping up under the default MODX core/components folder:

screen shot 2015-05-11 at 16 49 18

This results in the snippets not firing in some cases, but not all. Very, very strange.. Error log is silent.

@hugopeek
Copy link
Author

The snippet files in these wrong locations are empty btw..

@theboxer
Copy link
Owner

This is cache problem, system settings cache is not cleared properly during the installation (before it gets to installing elements) and MODX can't resolve formblocks.core_path.

You can clear cache manually (I would recommend deletion of everything under core/cache) and then update package via gpm.

I didn't spot this problem for a while, so you may have something different in your env around permissions...

@hugopeek
Copy link
Author

Thanks. I made sure I cleared the cache.. Even did a fresh install, but ended up at the same point. I isolated the problem now though, but I don't know where to look for an answer.. It is as follows: there is a Layout template in ContentBlocks, containing the snippet call of the fbStripAsAlias snippet:

<fieldset id="[[+legend:fbStripAsAlias]]" [[!cbGetFieldContent:contains=`"[[+legend:fbStripAsAlias]]"`:then=`class="collapse"`? &field=`[[++formblocks.cb_field_select_option_collapse_id]]` &returnAsJSON=`1`]]>
    <legend>[[+legend]]</legend>
    [[+main]]
</fieldset>

When I change the snippet back to being non-static, the snippet works. When I change the snippet to being static, in a different location than GPM, and without the [[++formblocks.core_path]] in the path field, the snippet works. But when I change the path to [[++formblocks.core_path]]elements/snippets/fbstripasalias.snippet.php, the snippet fails.. Probably because it can't find the contents of the file, since the generated files in MODX core/components are empty. In MODX, the snippet is referenced correctly, and the code is shown:

screen shot 2015-05-11 at 16 50 31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants