Just ctivated the module, both stable and dev.
Both of them break my site (Drupal 8.2.0-beta3 on PHP 7) both with MAX CDN and Amazon Cloud Front.
Followed the read-me, event the htaccess part. Still nothing.
Any ideas?

Thanks !

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mircea Shanti created an issue. See original summary.

Wim Leers’s picture

Category: Bug report » Support request
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

both stable and dev.

There is no stable release yet.

Looks like your CSS is not loading. Can you post a screenshot of the web developer tools showing your requests, and a screenshot of a CSS request in particular?

Mircea Shanti’s picture

Yes. But. I excluded .css and .js for being served by MAXCDN
Instead i tried to serve an Image.
From that error... could this be related to trusted_host_patterns? Because i tried to whitelist .netdna-cdn.com, .netdna-ssl.com and even maxcdn.com with no results.

Also. You have to know that all my www goes to non-www and all http to https. So it's a strict https/non-www site.

Thanks

Wim Leers’s picture

I excluded .css and .js for being served by MAXCDN

What does this mean? Did you do this exclusion thing on the Drupal side or on the MaxCDN side?

Instead i tried to serve an Image.

I'm assuming this is what you tried to show in the screenshot https://www.drupal.org/files/issues/Screen%20Shot%202016-08-29%20at%2017... ? If so, that looks to be working?

Wim Leers’s picture

Please export and upload your cdn.settings configuration.

Mircea Shanti’s picture

Hello !

No, it's not working. What I meant, like in the file attached, is that i tried to serve not "all files", but "only" jpg, png, jpeg and zip.
And it's not working since instead of the jpg it displays a placeholder with the message> "the image was removed. for security reasons only images from the local domain are allowed"...
And since on the testing environment only core+admin toolbar modules are installed, couldn't be related to another module (security or whatsoever)...
In fact i don't know how this as a Support Request. Because no one needs support to fill to empty fields on a module UI...
But. Problem or not problem, support or not support, the fact is that the css/js/jpg files are blocked when served from MAXCDN...

Wim Leers’s picture

Title: Breaks site » FilterHtmlImageSecure considers images served from a CDN to be insecure
Category: Support request » Bug report
Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Active

And it’s not working since instead of the jpg it displays a placeholder with the message> “the image was removed. for security reasons only images from the local domain are allowed”…

Oh, I see. That is \Drupal\filter\Plugin\Filter\FilterHtmlImageSecure interfering. That's absolutely a valid bug report! Thanks :)


Problem or not problem, support or not support, the fact is that the css/js/jpg files are blocked when served from MAXCDN…

I still don't understand this. Can you open a separate issue for this?

Mircea Shanti’s picture

Yes. But help me on how. Since is not just a maxcdn problem... but a problem with other CDNs too (tested with Amazon CloudFront also).
I attached you also a print screen with css/js errors

+

I have a big question. When i deactivated (uninstalled+removed from server) the module about one hour ago to change between available versions, i observed that the image from the test-article was still linked to MAX CDN. This is a major problem. What i'm saying: if the module doesn't replace the link to the local server uploaded image just temporary but replace it with the CDN instance for good, then one will be stuck with a specific CDN forever and ever (or doomed to manually replace all the images on a site if he changes the CDN provider). This doesn't sounds all right. Do you have any recommendations for this issue?

Thanks again !

Wim Leers’s picture

Title: FilterHtmlImageSecure considers images served from a CDN to be insecure » CDN + filtered text: FilterHtmlImageSecure considers images served from a CDN to be insecure, uninstalling CDN continues to serve cached filtered text

The screenshot you posted indicates SSL certificate issues. Contact MaxCDN support about that.

I have a big question. When i deactivated (uninstalled+removed from server) the module about one hour ago to change between available versions, i observed that the image from the test-article was still linked to MAX CDN.

Oh, right, in D8 module (un)installation no longer clears all caches. So I'll need to make sure that the cache is invalidated. Updated the issue summary to reflect that.

I'll try to address these problems this weekend.

Thank you very much for reporting these problems! :)

Wim Leers’s picture

Title: CDN + filtered text: FilterHtmlImageSecure considers images served from a CDN to be insecure, uninstalling CDN continues to serve cached filtered text » Uninstalling CDN module continues to serve cached filtered text

I worked on this part: CDN + filtered text: FilterHtmlImageSecure considers images served from a CDN to be insecure. But I can't reproduce it. basic_html has the correct configuration:

…
  filter_html_image_secure:
    id: filter_html_image_secure
    provider: filter
    status: true
    weight: 9
    settings: {  }
  editor_file_reference:
    id: editor_file_reference
    provider: editor
    status: true
    weight: 11
    settings: {  }

Note how filter_html_image_secure has weight 9 and editor_file_reference has weight 11. This means editor_file_reference will always run after filter_html_image_secure. And it's in <code>editor_file_reference that the file URL is generated that will point to the CDN.

The only possible conclusion is that your text format has the filters in the wrong order. Can you export your text format at /admin/config/development/configuration/single/export and post it here?

Wim Leers’s picture

Status: Active » Needs review
FileSize
2.72 KB

I've now finished writing the test coverage for Uninstalling CDN module continues to serve cached filtered text. I can't reproduce that either, nor can the test.

Status: Needs review » Needs work

The last submitted patch, 11: 2791725-11.patch, failed testing.

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
2.87 KB
2.34 KB

And now converted from WebTestBase to BrowserTestBase.

The last submitted patch, 11: 2791725-11.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 13: 2791725-12.patch, failed testing.

The last submitted patch, 13: 2791725-12.patch, failed testing.

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
2.89 KB
1.19 KB

Hm, it passes locally. Probably subdirectory-related.

Wim Leers’s picture

Title: Uninstalling CDN module continues to serve cached filtered text » Add integration test to ensure that uninstalling CDN module causes filtered text to have non-CDN URLs
Status: Needs review » Reviewed & tested by the community

That was it :)

  • Wim Leers committed 07096f4 on 8.x-3.x
    Issue #2791725 by Wim Leers, Mircea Shanti: Add integration test to...
Wim Leers’s picture

Category: Bug report » Task
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.