Giter VIP home page Giter VIP logo

Comments (8)

ahilles107 avatar ahilles107 commented on July 18, 2024

👍 have this same issue - reverting smarty to 3.1.21 fixes it. Looks like problem is with new getRenderedTemplateCode function.

from smarty.

uwetews avatar uwetews commented on July 18, 2024

Did you clear the cache after the upgrade? Can I find somewhere the code of the custom cache resource and the render plugin?

from smarty.

ahilles107 avatar ahilles107 commented on July 18, 2024

Hey, cache was cleared. Cache handler is here: https://github.com/sourcefabric/Newscoop/blob/master/newscoop/classes/cache/TemplateCacheHandler_DB.php

from smarty.

uwetews avatar uwetews commented on July 18, 2024

Do you use in your application template functions ({function ...}...{/function} and do you call these in {nocache}{/nocache} sections?
Here is a major difference between 3.1.21 and the upcoming 3.1.22 (master).
In 3.1.21 the template function code was evaluated. In 3.1.22 Smarty will update the cache by adding template function code to the cache file.
I such case Smarty will call Smarty_CacheResource_Newscoop::fetch() a second time to read the cache source, update it and write it back with Smarty_CacheResource_Newscoop::save().
It could be that the TemplateCacheHandler_DB does not handle this correctly and does corrupt the cache content.
The corresponding Smarty code can be found in smarty_internal_function_call_handler.php.
This functionality has been tested with our custom resource cacheresource.mysql.php.

Currently I can't see any other cause for the problem.

from smarty.

ahilles107 avatar ahilles107 commented on July 18, 2024

Hey @uwetews , thanks for checking but for us 3.1.22 works ok, problem is with latest master. This info change something?

from smarty.

uwetews avatar uwetews commented on July 18, 2024

I was not precise: 3.1.22 is not yet released = master.

from smarty.

ahilles107 avatar ahilles107 commented on July 18, 2024

Yeah, sorry it's late. 3.1.21 works ok for us. We will check Smarty_CacheResource_Newscoop. Thanks!

from smarty.

uwetews avatar uwetews commented on July 18, 2024

I think this can be closed

from smarty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.