[bd] Cache 1.3.2

Faster and faster.

  1. cyberpedz

    cyberpedz New Member

    I tried this. Then uninstalled now users are having serious issues with using the site. Menu is not showing properly. Post reply box is not visible all they can see is the reply button etc but the actual input box is not showing. I have hunted around and found the Page_cache folder which had nothing in. Deleted it anyway.

    Also found in internal_data a folder called templates which is full of .CSS.php files are these default xenforo or the CSS to file option from this adon any help would be welcome
     
  2. eva2000

    eva2000 New Member

    #186 eva2000, Aug 30, 2016
    Last edited: Aug 30, 2016
    how does one view the amp generated pages ? on my mobile i am not seeing it ? or is it just something google picks up via the amphtml header ?

    also i am seeing 404 error for incorrectly referenced html source for /bdCache/amp_logo.png

    it's referenced as forumurl/bdCache/amp_logo.png

    other AMP validation errors include
    Code:
    The attribute 'http-equiv' may not appear in tag 'meta name= and content='.
    
    The tag 'noscript > style[amp-boilerplate] - old variant' is deprecated - use 'noscript > style[amp-boilerplate]' instead. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
    
    The mandatory text (CDATA) inside tag 'noscript > style[amp-boilerplate] - old variant' is missing or incorrect. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
    
    The attribute 'style' may not appear in tag 'div'.
    
    The tag 'div90' is disallowed.
    
    The tag 'noscript > style[amp-boilerplate]' appears more than once in the document. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
    
    The attribute 'amp-custom' may not appear in tag 'noscript > style[amp-boilerplate] - old variant'. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
    
    The tag 'script' is disallowed except in specific forms.
    edit: sorry most of the errors besides tag div90 disallowed are related to ngx_pagespeed which i added an exclusion rule for

    Code:
    pagespeed Disallow *?amp=*;
    
    End result is

    upload_2016-8-30_10-37-24.png

    fixed 404 by changing bdcache_amp_header template from

    Code:
    <amp-img src="@imagePath/bdCache/amp_logo.png" title="{$xenOptions.boardTitle}"
    
    to
    Code:
    <amp-img src="/@imagePath/bdCache/amp_logo.png" title="{$xenOptions.boardTitle}"
    
     
    Amin Sabet likes this.
  3. eva2000

    eva2000 New Member

    on Chrome on Android 6.0.1 via S7 mobile seems amp page subsequent posts aren't loading ALL attached images in posts - some just come up as 3 dots

    example https://community.centminmod.com/threads/forum-new-style-flat-pixel-default.8162/?amp=1469691841

    edit: seems after a few refreshes all images are now loaded

    fyi, i changed bdcache_amp_header template for text based logo support in flatawesomeplus style
    HTML:
          <div id="logo"><a href="{$logoLink}">
              <xen:if is="@xb_logoastext">
              @xb_logotext
              <xen:else />
              <amp-img src="/@imagePath/bdCache/amp_logo.png" title="{$xenOptions.boardTitle}" width="600" height="60" layout="fixed" />
              </xen:if>
          </a></div>
     
  4. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    How is @imagePath configured in your style property? The prefixed "/" should not be necessary.

    Yeah, for style specific stuff, it's best to edit the template directly ;) How is it working for you now?
     
  5. rimesia

    rimesia New Member

    [client ***] File does not exist: /home/***/public_html/forums/data/bdCache/css/1470578795

    I'm getting lots of this errors in my apache error log. I deactivated extension but still couldn't solve this. Any idea ?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @rimesia Search bot or other crawlers might have save older version of your sites and when they try to access the out dated css files, it will generate those errors. You can safely ignore those because fresh files are regularly generated by itself.
       
  6. Sebouley

    Sebouley New Member

    On my install, only the first page of a thread gets an AMP equivalent

    All subsequent pages don't have AMP tags in the source header.

    Same is true on this board (xfrocks.com / @xfrocks )

    this is with any style, including the default one. Sounds like a major bug.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Sebouley Actually it was designed that way because currently only Google News support AMP so the meta tags are rendered for the first page only. In future release, this behavior may change.
       
  7. chromaniac

    chromaniac New Member

    Just installed this. Not sure where I can find the option to clear cache of individual pages. Also not sure how to check if and how AMP is working. Any suggestions are welcome! Thanks.
     
  8. chromaniac

    chromaniac New Member

    so i tested with a pretty long cache limit (24 hours). the homepage with recent posts widget got stuck on a snapshot from many hours ago. now, no matter what i do, the cache is not getting renewed. tried reducing the time limit to 10 second, 1 minute, 10 minutes. tried disabling the plugin and re-enabling it. the cache is not resetting! i also cannot find any control to reset the cache. what am i missing!
     
    1. RoldanLT

      RoldanLT Active Member

      RoldanLT @chromaniac Restart Memcached or Redis caching?
       
  9. chromaniac

    chromaniac New Member

    I don't think I have any cache on my Dreamhost VPS right now. Backend shows APC but XenForo freaks out whenever I turn it on. So I am relying on file based caching right now.
    Noticed the bdcache folder in internal data folder and cleaning it up seems to have solved my problem. But still wondering about this part from product description:

    Even with cache set at 10 minutes interval, homepage did not update at all for hours! It only refreshed when I emptied the bdcache folder. I am wondering if I should set up a cron job to empty that folder at regular intervals?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @chromaniac You can view source to check the timestamp of the cached page, something like:

      Code:
      <meta name="bdcache" content="1476362902" />
      You can also force a purge by clicking the add-on link on the moderator bar. Some style may hide additional links so try to find it in default style first.

      To check for amp, view source and look for something like:

      Code:
      <link rel="amphtml" href="http://domain.com/xenforo/threads/1234/?amp=1234567890">
      View the link in your browser to see how it will look in AMP, make sure you resize the browser window so the width is <800px. AMP works best on mobile devices.
       
  10. ngannguyen

    ngannguyen New Member

    Hi,
    I installed the latest version of this addon but I can not see any cache files stored in this folder: .../internal_data/bdCache
    And users have to refresh or press CTRL F5 continuously to clear caches so as to view the latest/updated data in our forum
    What are the problems ?
    Any special configuration to fix these ones ?
    Any requirements from server side ?

    Thanks
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @ngannguyen By default, the cache data is saved in the configured Cache Backend (see https://xenforo.com/help/cache/) which is normally faster.

      It only fallback to use /internal_data if your site does not have a cache configured, if you still want to use the filesystem, add this to your config.php:
      Code:
      $config['bdCache_forceFile'] = true;
      The default TTL for cached page is 10 minutes. You can either disable the cache pages feature or reduce that time in the add-on options page (AdminCP > Home > Options > [bd] Cache).
       
      ngannguyen likes this.
      1
  11. chromaniac

    chromaniac New Member

    Right. It was my theme that was hiding the cache cleaning links :D Now it makes complete sense.
     
    xfrocks likes this.
  12. chromaniac

    chromaniac New Member

    I noticed that memcached is available to me so I added the code directed by <https://xenforo.com/help/cache/> and forum does not show any error so I assume it is working. bdcache is still storing files in the internal cache folder. Does this mean that memcache is not working?
     
  13. RoldanLT

    RoldanLT Active Member

    On debug mode, I got this error/notice.
     
  14. Albanian

    Albanian New Member

    Hi there,

    Ive just purchased this addon, ive uploaded the files and uploaded the xml file in the addon install page.. But when i want to validate my forum through : https://validator.ampproject.org/ its giving the follow message:"Validation Status: FAIL" And the only thing what i see are errors like :
    Code:
    The attribute 'xmlns:fb' may not appear in tag 'html :zap: for top-level html'. DISALLOWED_HTML
    line 2, column 0
     
    The property 'minimum-scale' is missing from attribute 'content' in tag 'meta name=viewport'. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
    line 8, column 78
     
    The attribute 'href' may not appear in tag 'base'. DISALLOWED_HTML
    line 9, column 0
     
    The tag 'noscript > style[amp-boilerplate] - old variant' is deprecated - use 'noscript > style[amp-boilerplate]' instead. DEPRECATION
    line 11, column 10
     
    The mandatory text (CDATA) inside tag 'noscript > style[amp-boilerplate] - old variant' is missing or incorrect. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
    line 11, column 10
     
    The attribute 'href' in tag 'link rel=stylesheet for fonts' is set to the invalid value 'data/bdCache/css/1477232004/305b5a2da340c9fa76e654783fa0eadb.css'. AUTHOR_STYLESHEET_PROBLEM
    line 12, column 0
     
    The attribute 'href' in tag 'link rel=stylesheet for fonts' is set to the invalid value 'data/bdCache/css/1477232004/b2c65c0ce231cd870c81b2060b2803ff.css'. AUTHOR_STYLESHEET_PROBLEM
    line 13, column 0
     
    The tag 'label' may only appear as a descendant of tag 'form'. DISALLOWED_HTML
    line 30, column 0
     
    Invalid URL protocol 'http:' for attribute 'src' in tag 'img'. DISALLOWED_HTML
    line 69, column 121
     
    The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
    line 69, column 121
     
    Invalid URL protocol 'http:' for attribute 'src' in tag 'img'. DISALLOWED_HTML
    line 633, column 121
     
    The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
    line 633, column 121

    Did i do something wrong, i fetched the forum on google webmasters but still showing those error codes?
     
  15. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Did you delete the bdCache directory? After the switch, it does not clean up itself.

    You are on PHP7? That's a warning and can be safely ignored. New version has moved to a new implementation anyway so you should be able to get rid of that notice soon.

    Which url did you use to validate?
     
    RoldanLT likes this.
    1. Albanian

      Albanian New Member

      Albanian @xfrocks I used the main domain to validate http://wwww.example.com
       
    2. xfrocks

      xfrocks XenForo rocks!
      Staff Member

    3. Albanian

      Albanian New Member

    4. RoldanLT

      RoldanLT Active Member

      RoldanLT @xfrocks Yes using PHP 7.1 RC4.
       
      xfrocks likes this.
      1
  16. Albanian

    Albanian New Member

    Hey there,

    Ive controled again google webmasters and saw that there are 312 threads validated by AMP, but still not all.. Is this a matter of time till all the pages are validated for AMP?
     
  17. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Can you share the thread link for validation? Via conversation is fine.

    Yes, it takes time for Google to start indexing AMP pages.
     
  18. Pete Thomas

    Pete Thomas New Member

    AMP does not seem to be working. If I add /amp/ to the end of URL it just shows page not found.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Pete Thomas You should add "?amp=1" ;)
       
  19. Pete Thomas

    Pete Thomas New Member

    #213 Pete Thomas, Nov 3, 2016
    Last edited: Nov 11, 2016
    Aha thanks. Is there a manual somewhere for this?

    I am finding that images are showing as huge, ie the full size of the post even when they are tiny images

    All images in posts show as full size of the post, so for images that are quite small size originally (e.g. 200px wide) , they look very bad when resized to fit the container.

    Same is happening for posts in my custom footer, even thogh image sizes are defines in the CSS, they expand to fill the container.


    Also the header logo is missing. Is that normal?

    Are there any instructions on fixing this?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Pete Thomas Yes, images are currently being rendered as block. Regarding the header, you can put one at styles/your-style-directory/bdCache/amp_logo.png for it to show up in AMP pages.
       
    2. Pete Thomas

      Pete Thomas New Member

      Pete Thomas @xfrocks How do I fix this?
       
  20. naveedali

    naveedali New Member

    Hello. i face problem on menu loading with UI.X theme. like this

    Screenshot_2.jpg
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @naveedali The link you provided is pretty old and it indicated an issue with Ad Styler? Which version of UI.X add-on and theme are you using?
       
    2. naveedali

      naveedali New Member

      naveedali @xfrocks i have latest ui-x 1.5.10.0 and dont use Ad Styler. just menu loading problem, if i close bd-cache menu load fine.
       
Loading...