Comments (24)
Actually I think that the cache is active when I'm logged in, which is likely what's causing the above. If I understand the intended function correctly it should be ignoring the cache if I'm logged in.
from cachelite.
Yep. Cache should not be active if you are logged in.
Try editing this line:
https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L254
to:
$logged_in = isset(Frontend::instance()->Author());
Accessing Author was changed recently me thinks.
from cachelite.
Accessing Author was changed recently me thinks.
Exactly. See https://github.com/symphonycms/symphony-2/wiki/Migration-Guide-to-2.5-for-Developers#properties for the migration path.
from cachelite.
+1 Experiencing the same problem. Any fixes known?
@andrewminton - your suggested change above generates the follow Fatal Error...
Fatal error: Cannot use isset() on the result of a function call (you can use "null !== func()" instead) in /sites/public/extensions/cachelite/extension.driver.php on line 255
Also, I try the suggested change in the Fatal error to change it to "null !== Frontend::instance()->Author();
" and that doesn't work either.
from cachelite.
Try Symphony::Author()
. Am I right you are running PHP 5.5+? Is this the first time you have used the extension running that?
from cachelite.
I was most likely using 5.3
On 3 Oct 2014, at 00:01, Brendan Abbott [email protected] wrote:
Try Symphony::Author(). Am I right you are running PHP 5.5+? Is this the first time you have used the extension running that?
—
Reply to this email directly or view it on GitHub.
from cachelite.
$logged_in = Symphony::isLoggedIn();
from cachelite.
I am running PHP 5.5. I tried...
$logged_in = Symphony::isLoggedIn();
and it still breaks ?debug
; when I disable the extension... ?debug
works.
from cachelite.
Can you try var_dump
'ing the $logged_in
value ?
from cachelite.
Can you try
var_dump
'ing the$logged_in
value ?
It returns bool(true)
from cachelite.
This is weird...
from cachelite.
Are you entering this if ?
https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L268
from cachelite.
Are you entering this if ?
https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L268
I put a var_dump($logged_in)
inside that if and nothing runs... so it doesn't look like it is entering that if
from cachelite.
So you're not getting the cache then... Looks like a delegate mixup...
Can you try to:
- Disable Cachelite, confirm that ?debug is working...
- Enable Cachelite, confirm that ?debug is not working...
- Enable Debug Devkit even if it is enabled already ?
from cachelite.
Never mind, they do not even share any delegates... https://github.com/symphonycms/debugdevkit/blob/master/extension.driver.php#L10
from cachelite.
I did try that. But no go.
Also, just to confirm, my comment where I say that var_dump($logged_in);
returns bool(true)
, that is with $logged_in = Symphony::isLoggedIn();
When $logged_in = isset(Frontend::instance()->Author);
and running var_dump($logged_in);
nothing outputs.
from cachelite.
Can/did you try to change isset(Frontend::instance()->Author);
with Symphony::isLoggedIn();
everywhere ?
https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L254
https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L324
from cachelite.
Can/did you try to change isset(Frontend::instance()->Author); with Symphony::isLoggedIn(); everywhere ?
https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L254
https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L324
Uggh! I missed line 324. That was it!
I replaced isset(Frontend::instance()->Author);
with Symphony::isLoggedIn();
everywhere
It is working!
from cachelite.
So is ::isLoggedIn ();
in itself accessing Symphony::Author ()
then?
from cachelite.
@bzerangue Great! I'll re-open the issue and add the proper fix in the code! Thanks!
@andrewminton Yes, for sure: https://github.com/symphonycms/symphony-2/blob/master/symphony/lib/core/class.symphony.php#L583
from cachelite.
So is ::isLoggedIn (); in itself accessing Symphony::Author () then?
Yes. In a more sustainable way. This is the correct function to verify that an Author is logged in.
from cachelite.
Ok thanks @brendo
from cachelite.
So @nitriques, isn't there a fix already for this judging by the comments?
from cachelite.
isn't there a fix already for this judging by the comments?
An untested one, yes.
EDIT: untested = I've personally not tested it.
from cachelite.
Related Issues (20)
- Possible "duplicates" errors HOT 7
- 2.4 woes HOT 12
- 2.4/2.5 Compatibility HOT 4
- Cachelite with one page HOT 20
- Delete the 'gzip' branch HOT 1
- Can't flush cache HOT 14
- Doesn't include changes performed by the "HTML5 Doctype" extension. HOT 6
- Cachelite problem with frontend HOT 20
- Unstyled snapshot HOT 8
- Symphony Warning: DOMDocument::loadXML(): AttValue: " or ' expected in Entity, line: 1 HOT 4
- Members extension with frontend CMS HOT 1
- Does not respect the protocol
- Cache Period doesn't work at all HOT 1
- Varchar(255) is not enough
- Update 1.3.3 -> 2.0.0 error Invalid default value for 'timestamp' HOT 7
- Cachelite doesnt work on the default page HOT 7
- Excluded url's not working 100% HOT 3
- Table: sym_cachelite_references is 250MB after some days is this normal? HOT 8
- Update Cache_Lite version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cachelite.