v3.6.2 Undefined property: Template::$mime

34 views
Skip to first unread message

AdrianD

unread,
Jul 5, 2017, 5:45:17 AM7/5/17
to Fat-Free Framework
I've recently tried updating my code to v3.6.1 and 3.6.2.  In both instances,  I start to get the following error:  "Error 500: Undefined property: Template::$mime".

The error occurs in any HTML code that has an include call,   e.g. in partial.html:  <include href="partials/feedback.html"/>

I can't find any coding fix to this.  After some trial and error, realised that this is a caching issue.  If I clear the \tmp and \tmp\cache, the problem is resolved.

I'm not an F3 guru. I don't know why this error occurs, but raise it here in case others experience a similar issue.

ved

unread,
Jul 5, 2017, 6:27:42 AM7/5/17
to Fat-Free Framework
Is that the full error message? Can you set DEBUG=3 and see if there's a more complete stack trace of the error.

Also, after you clean the tmp and cache folders, does the error reappear once you load the page again?

It's indeed a strange error since searching the fatfree-core repository I can't find any mention of a $mime property in the Template class.

AdrianD

unread,
Jul 5, 2017, 6:40:54 AM7/5/17
to Fat-Free Framework
(1) I will try to attach StackTrace if it occurs again.   The snippet from our error logging shows that F3 converted the include statement to 

<!-- Include user reviews --><?php echo $this->render('pages/reviews.html',$this->mime,get_defined_vars(),0); ?>

(2) After I clear the tmp/cache folders, the error does NOT reappear.

(3) I had a 3rd party developer introduce some code.  I also don't see any reference to mime in his code, so unsure the reason.

PS.  Thanks Ved for the speedy response.

ikkez

unread,
Jul 5, 2017, 5:58:33 PM7/5/17
to Fat-Free Framework
From the docs (1. Page)

Important: If your application uses APC, Memcached, WinCache, XCache, or a filesystem cache, clear all cache entries first before overwriting an older version of the framework with a new one. This can also be done (except XCache) by calling $f3->clear('CACHE').
Reply all
Reply to author
Forward
0 new messages