kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 132 forks source link

sometimes asset-collection fails to parse text variables #69

Closed aegagros closed 11 years ago

aegagros commented 11 years ago

I have had problems with the same bug in the past, and used other workarounds (see here). However, I found out that the asset data defined in the content text file (e.g. image description) failed to load, sometimes depending on the folder level (same file worked under 'content/' but not under 'content/some-other-folder'). Therefore, I thought of replacing the following lines 14-16 of asset-factory.inc.php:

    # return any page data scoped against the asset filename
    $page_data = self::$store[$page_path];
    return isset($page_data[$file_name]) ? $page_data[$file_name] : false;

with the following:

    # return any page data scoped against the asset filename
    $page_data = self::get($page_path);
    return isset($page_data[$file_name]) ? $page_data[$file_name] : false;

see my fork: http://github.com/aegagros/stacey

kolber commented 11 years ago

Thanks Manolis, I have merged this fix into the main codebase.