jpb10
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Storefront] Remove button outline goes to -9999pxThe X button in cart and cart page.
Chrome:
https://i.imgur.com/Oc8ERXb.pngFirefox:
https://i.imgur.com/2c8BbVq.png- This reply was modified 5 years, 5 months ago by jpb10.
Forum: Plugins
In reply to: [W3 Total Cache] No expire headers in S3While looking for a workaround, I noticed that “S3 Compatible” behaves like the old W3TC version in setting the correct metadata.
Assuming you have a CNAME associated with your CloudFront distribution, setting that domain in the S3 compatible CDN settings should(?) work like a hypothetical “CloudFront over S3 Compatible” option.
What is the official use case for S3 Compatible? I couldn’t find any documentation on it.
- This reply was modified 5 years, 6 months ago by jpb10.
Forum: Plugins
In reply to: [W3 Total Cache] No expire headers in S3The problem seems to be… in this commit:
Forum: Plugins
In reply to: [W3 Total Cache] No expire headers in S3Thanks for your response, but that doesn’t solve the issue.
The metadata in S3 is set incorrectly since June 2019.
I don’t expect users will manually append cache control and expires values to every file uploaded from this time forward. And that’s not addressing the unnecessary x-amz-meta-* values.
Forum: Plugins
In reply to: [W3 Total Cache] browser caching issue with CDN contentI’m having the same issue and this topic is far from resolved.
Recent changes in either S3 or W3TC is putting redundant user-defined metadata (x-amz-meta-*) on files uploaded thru W3TC. Suspecting W3TC (since “user-defined”).
No expires or cache control header is being set.
Ref:
https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-object-metadata.htmlForum: Plugins
In reply to: [W3 Total Cache] “Distribution for origin x not found”Correct.
The original code only looks at the first distribution.
Which is why the test passes when you first create the bucket and distribution thru W3TC, but fails after you add other distributions.
Example: https://forums.aws.amazon.com/thread.jspa?threadID=65546
Forum: Plugins
In reply to: [W3 Total Cache] No expire headers in S3I tried explicitly defining max-age in .htaccess by changing:
<IfModule mod_headers.c> Header set Pragma "public" Header append Cache-Control "public" Header unset Set-Cookie </IfModule>
to:
<IfModule mod_headers.c> Header set Pragma "public" Header set Cache-Control "max-age=31536000, public" Header unset Set-Cookie </IfModule>
Which does alter the live headers (no CDN). However, if I delete some files from S3 and reupload them thru W3TC, then I get the same weird/redundant metadata cited in OP.
Typical response looks like this:
last-modified: Sat, 10 Aug 2019 19:25:26 GMT status: 200 date: Sat, 10 Aug 2019 22:32:37 GMT x-amz-cf-pop: SEA19 x-amz-version-id: null content-encoding: gzip x-amz-meta-content-encoding: gzip x-amz-meta-link: <https://my.site/usr/local/www/apache24/data/wp-includes/js/jquery/jquery-migrate.min.js>; rel="canonical" x-amz-cf-id: aPZF_VMB8M9Wg3Wh6bfg_SKkbgBljTmpIp4HYJ-rHerU2v4LijNaxQ== age: 365 x-amz-meta-access-control-allow-origin: * x-amz-meta-content-type: application/x-javascript content-type: application/x-javascript server: AmazonS3 accept-ranges: bytes content-length: 4014 x-amz-meta-vary: Accept-Encoding etag: "a6c81e2f02bd04160d2de88c4e8f3559" via: 1.1 aa42484f82c16d99015c599631def20c.cloudfront.net (CloudFront) x-amz-meta-last-modified: Sat, 10 Aug 2019 19:25:03 GMT x-cache: Hit from cloudfront
Still no expires or cache control.
Forum: Plugins
In reply to: [W3 Total Cache] No expire headers in S3Okay, so the max-age in Cache-Control should be set by mod_expires.c, which is indeed set by W3TC:
<IfModule mod_expires.c> ExpiresActive On ExpiresByType text/css A31536000 [...] </IfModule>
The .htaccess seems fine. But I don’t get why Apache serves:
cache-control: max-age=0, no-store, public
Forum: Plugins
In reply to: [W3 Total Cache] “Distribution for origin x not found”Bug is here: https://github.com/W3EDGE/w3-total-cache/blob/c5aeabd74ff9899139bb16cbb314377b1a040229/CdnEngine_CloudFront.php
private function _get_distribution( $dists = null ) { [...] $dist = false; $origin = $this->_get_origin(); $items = $dists['DistributionList']['Items']; foreach ( $items as $dist ) { if ( isset( $dist['Origins']['Items'][0]['DomainName'] ) && $dist['Origins']['Items'][0]['DomainName'] == $origin ) { return $dist; } } throw new \Exception( sprintf( 'Distribution for origin "%s" not found.', $origin ) );
$dist['Origins']['Items'][0]['DomainName']
should check for each Origin instead of only [0]. I changed it to [1] and “Test passed”. (I have two origins.)I don’t think this does anything other than confirm that the distribution exists for said origin, though.
Ref: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ListDistributions.html
Forum: Plugins
In reply to: [W3 Total Cache] No expire headers in S3Files uploaded on June 4 2019 are fine. The metadata has Cache-Control and Expires values.
Beyond that, June 24 2019 is the earliest upload and from there, the metadata is different (see OP).
These dates seem to coincide with the release of version 0.9.7.5. Which states in its changelog:
Updated AWS library
Suspicious. I tested the site without CDN and, although the files have correct Expire headers (1 year), the Cache-Control seems wrong:
cache-control: max-age=0, no-store, public
The cache control option and policy for these files are indeed ticked in the Browser cache section. Although, I looked at my .htaccess and W3TC doesn’t seem to be applying the policy. The relevant section:
<FilesMatch "\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$"> FileETag MTime Size <IfModule mod_headers.c> Header set Pragma "public" Header append Cache-Control "public" Header unset Set-Cookie </IfModule> </FilesMatch>
No max-age.
I’m left wondering:
Who sets these weird x-amz-meta tags in S3?
And, why is W3TC not setting up my .htaccess for Cache-Control (max-age)?Forum: Themes and Templates
In reply to: [Storefront] Custom SCSSNo problem!
That confirms my suspicion… I will look into that option.
Thanks
Forum: Themes and Templates
In reply to: [Storefront] Custom SCSSIn summary, I would like to change the span values of site-branding and secondary-navigation from 3+6 to something like 6+3, in order to accommodate for my long title.
Forum: Themes and Templates
In reply to: [Storefront] Custom SCSSThanks for the responses.
I have a relatively long title, eg. “yet another wordpress & woocommerce site”. When I don’t use the secondary menu, everything looks fine.
When I do use the secondary menu (for “My Account” and instagram link), the title squishes to 2 or 3 lines, depending on the window width.
Without secondary menu:
.woocommerce-active { .site-header { .site-branding { @include span(9 of 12); [...] }
With secondary menu:
.storefront-secondary-navigation { [...] &.woocommerce-active { .site-header { .site-branding { @include span(3 of 12); } .secondary-navigation { @include span(6 of 12); [...] }
I would like to be able to manage the span widths of site-branding and secondary-navigation.
I rolled back to PHP 7.2.15 and now SMTP works.
PHPMailer is broken with PHP 7.3.2 on FreeBSD.
I go the hint from looking at current FreeBSD packages: no PHPMailer port (version 5 or 6) available for PHP 7.3 yet. I guess WordPress uses one of these.
- This reply was modified 6 years ago by jpb10.