0
Welcome Guest! Login
0 items Join Now

Gantry Cache - How to disable completely or for a specific component

    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 10 months ago
    • pscharfg wrote:
      It's been a few days so just checking to see if you made any progress.

      Yes, there is something happening with your sh404sef as I turned it off and purged your cache. Then I turned it on and was able to go through the shops page -> select an item -> add to cart -> go to checkout with no issues.
  • Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 10 months ago
    • DanG wrote:
      pscharfg wrote:
      It's been a few days so just checking to see if you made any progress.

      Yes, there is something happening with your sh404sef as I turned it off and purged your cache. Then I turned it on and was able to go through the shops page -> select an item -> add to cart -> go to checkout with no issues.

      SH404Sef was disabled. Even if i remove the component, when the cache is cleared I still get the errors. The issue is the cart not working - it's all the errors that are getting thrown into the body and head.

      I have uploaded a screenshot - taken after sh404sef was removed and the cache was cleared. See the secure section for the link.
    • Last Edit: 9 years 10 months ago by pscharfg.
  • Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 8 months ago
    • Sorry to hijack this thread.
      I have the same problems. Also Rockettheme template, Mijoshop 3.06 & Joomla v3.4

      I've been digging and think the problem is in Joomla's core routine. /libraries/joomla/cache/storage/file.php line 280

      When using Mijoshop the cache is regular cleaned. Files are deleted from the server but still available in the database.
      @fopen wants to read the 'deleted' cached file.
      php.net states no error is generated when put @ in front, the error is generated.
      see php.net/manual/en/function.fopen.php

      I changed line 280 from
      $_fileopen = @fopen($path, "r+b");

      to
      $_fileopen = @fopen($path, "c+b");

      and this solved my problem.

      This seems a long standing problem which has never been solved
      joomlacode.org/gf/project/joomla/tracker...racker_item_id=26735

      Hope this can be of any help.
  • Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 8 months ago
    • Thank you so much for your reply. This has been driving me nuts. Just out of curiousity, if all of the cache extemsions are disabled, why would your suggested change make a difference? I am traveling so I am not in a position to look at the rest of the php. What does the path variable change from "r+b" to "c+b" actually do? Do any of the folks at Rockettheme agree with this as its clearly related to Gantry's caching system?
    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 8 months ago
    • pscharfg wrote:
      Do any of the folks at Rockettheme agree with this as its clearly related to Gantry's caching system?

      No we don't. A little about what Gantry-4 caches:
      • Rockettheme's template CSS & LESS files to create the master.css file
      • Gantrys own PHP files
      • Gantrys own JS files

      On the other hand all Joomla core files and extensions and some content is handled ALL by Joomla and NOT Gantry.
      Hope this helps in clarifying in what Gantry-4 does ;)
  • Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 8 months ago
    • @pscharfg
      As far I can see this is a Joomla core problem, not Gantry, Mijoshop, ...

      As stated on php.net/manual/en/function.fopen.php

      'r+' Open for reading and writing; place the file pointer at the beginning of the file.
      'c+' Open the file for reading and writing; otherwise it has the same behavior as 'c'.
      and
      'c' Open the file for writing only. If the file does not exist, it is created. If it exists, it is neither truncated (as opposed to 'w'), nor the call to this function fails (as is the case with 'x'). The file pointer is positioned on the beginning of the file. This may be useful if it's desired to get an advisory lock (see flock()) before attempting to modify the file, as using 'w' could truncate the file before the lock was obtained (if truncation is desired, ftruncate() can be used after the lock is requested).

      I've filed a bugreport on joomla.org. Let's see what the dev's say there.
    • The following users have thanked you: prim, Henning, DanG

    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 8 months ago
    • Fonny Smets wrote:
      I've filed a bugreport on joomla.org. Let's see what the dev's say there.

      We really appreciate when members step up to the plate like this - Kudos
      This image is hidden for guests.
      Please log in or register to see it.
  • Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 8 months ago
    • Fonny Smets wrote:
      I changed line 280 from
      $_fileopen = @fopen($path, "r+b");

      to
      $_fileopen = @fopen($path, "c+b");

      and this solved my problem.

      I'm back from traveling and just tried your suggestion - it definitely got rid of the errors. However, it seems as if there is a negative performance impact. Do you see the same thing?

      Thanks again for your help and for filing the bug report. I'm very curious to see what the devs say.
  • Re: Gantry Cache - How to disable completely or for a specific component

    Posted 9 years 8 months ago
    • Answer is: check your server configs. So I did. And indeed: I had the display_errors directive ON for that account on the server. Don't ask me why. ;(
      Display_errors is global OFF on the server. That's why I didn't look at it.

      With display_errors ON , Warnings are send to the screen! Even when the suppress mode (@) is used with fopen. Check in Joomla System->System Information->PHP Information and verify the Local Value of display_errors. This should be Off.

      Also check if you have Error Reporting set to None in Joomla Global Config.

      Having display_errors ON and Joomla Error Reporting to System Default will show the Warning errors.

      The difference bewteen mode r+ and c+ is that php creates the file if it doesn't exist and doesn't return a warning. I didn't had any performance issues.

      So no Joomla core problems either but indeed server settings in my case.
    • The following users have thanked you: DanG, pscharfg

Time to create page: 0.072 seconds