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

Empty error log #8

Open
Gallenkamp opened this issue Nov 12, 2012 · 3 comments
Open

Empty error log #8

Gallenkamp opened this issue Nov 12, 2012 · 3 comments

Comments

@Gallenkamp
Copy link

Hi Jason,

after MODXpo, I am trying to speed up my site. but unfortunately I cant get StatCache to work. Apache Log is Empty, MODX log is empty, statcache folder is empty.

Permissions are set to 777, I tried www-data and the ftp user as owners. No luck so far. Yes, I checkt both of the system events boxes.

Any idea where I could continue digging?

Cheers,

Guido

@opengeek
Copy link
Owner

Do you have any non-cacheable tags in your site? Any Resources that contain ANY non-cacheable tags will not be cached.

@ghost
Copy link

ghost commented Nov 27, 2012

I had the same issue so i tested with skipIfTagsRemain = No in plugin settings and the static file was created. Then i searched for the brackets "[[" in $modx->resource->_content to find all uncached tags. I was suprised to find out that the only remaining tags where [[_id:isnot=214:then=http://mysite.com/]] from the canonical url filter [[_id:isnot=[[++site_start]]:then=[[~[[*id]]]]]] . I deleted the canonical url rule since its really obsolete for my site and everything worked fine.

@ghost
Copy link

ghost commented Nov 28, 2012

Placeholders with the :isnot output filter and with a value equal to the isnot value can be found partly proccessed when searching $modx->resource->_content.
Then during $modx->cacheManager->writeFile($statcacheFile, $modx->resource->_output)
the placeholders are fully processed so they don’t exist in the final html file.

Example 1. (remaining tags)
[[+placeholder]] has value equal to 'something'
Inside Template: [[+placeholder:isnot=something:then=[[placeholder]]:else=[[+placeholder2]]]]
Inside $modx->resource->_content : [[+placeholder:isnot=something:then=something:else=placeholder2value]]
After $modx->cacheManager->writeFile($statcacheFile, $modx->resource->_output) : something

Example 2. (no remaining tags)
[[+placeholder]] has value equal to 'randomstring'
Inside Template: [[+placeholder:isnot=something:then=[[placeholder]]:else=[[+placeholder2]]]]
Inside $modx->resource->_content : randomstring
After $modx->cacheManager->writeFile($statcacheFile, $modx->resource->_output) : randomstring

It seems to me that until this issue is resolved someone has two choices, to disable the skipIfTagsRemain and inspect manually for uncached tags or to avoid output filters.

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