Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot embed YouTube link on CWP #2168

Closed
6 tasks done
robbieaverill opened this issue May 16, 2018 · 14 comments
Closed
6 tasks done

Cannot embed YouTube link on CWP #2168

robbieaverill opened this issue May 16, 2018 · 14 comments

Comments

@robbieaverill
Copy link
Contributor

robbieaverill commented May 16, 2018

Environment:

  • mediumtest-uat on CWP
  • SilverStripe 4.1.0
  • CWP 2.0-rc3

Steps:

  • Go to a CMS page
  • Click on "Insert media via URL"
  • Paste a link to a YouTube video
  • Hit "Add media"

Expected:

  • Video will be embedded into TinyMCE content

Actual:

  • Network request fails with 503 Service Temporarily Unavailable
  • Media dialog shows an error

image

image


Reported by @emteknetnz via SilverStripe Ops, supposedly works correctly on localhost. This could possibly be an Incapsula issue?


Pull requests

@madmatt
Copy link
Member

madmatt commented May 16, 2018

/cc @ishannz who is also affected by this.

@chillu chillu added this to the Recipe 4.2.0 milestone Jun 10, 2018
@indygriffiths
Copy link

When this issue initially was raised with RC's our first guess was that the request isn't being correctly passed through the CWP proxy given the error message.

The docs state that By default, we configure the PHP environment with http_proxy and https_proxy variables which will be automatically picked up by curl so it would be worth checking to see if the framework is making the request by some other means that may not use those variables (does Guzzle?)

@caffeineinc
Copy link

I created a pull request on silverstripe-asset-admin which hopefully would address the underlying issue. We'd still need to reference that somewhere in the CWP recipe.

silverstripe/silverstripe-asset-admin#793

@robbieaverill
Copy link
Contributor Author

All PRs added to issue description

@lukereative
Copy link
Contributor

@robbieaverill All reviewed so should be good for a core committer to merge them all

@robbieaverill
Copy link
Contributor Author

Thanks @lukereative

@robbieaverill
Copy link
Contributor Author

robbieaverill commented Jun 20, 2018

All PRs merged, fixes will be available in 4.1.x and 4.2.x (incl. CWP 2.1.0)

@katieelks
Copy link

We are getting this issue again, confirmed in a couple of environments. Is this a regression perhaps?

@robbieaverill
Copy link
Contributor Author

robbieaverill commented Aug 15, 2018

Confirmed the regression with CWP 2.1.0 and CWP 2.1.1-rc2. I'll investigate further today with help from SilverStripe Platform team.

@robbieaverill
Copy link
Contributor Author

Sorry, I'm mistaken. I can't reproduce this any longer on CWP 2.1.1-rc2.

@katieelks can you please ask one of your devs to add the missing error logging configuration from CWP 2.x (see silverstripe/cwp-core#43) and re-deploy, then try again? This should mean you get some debugging information in Graylog.

@brynwhyman
Copy link

brynwhyman commented Sep 27, 2018

For reference: after a few iterations, a fix that was originally applied to config in cwp-recipe-cms was moved to cwp-core to ensure it would be picked up by all CWP sites regardless of other modules that are installed. This was released for CWP 2.1.1 in early September.

See silverstripe/cwp-recipe-cms#11

@sunnysideup
Copy link
Contributor

sunnysideup commented Oct 12, 2018

We have CWP 2.1 installed:

in cwp-recipe-cms:

---
Name: cwpoembedconfig
After: coreoembed
Except:
  environment: dev
Only:
  EnvVarSet: SS_OUTBOUND_PROXY
---
SilverStripe\Core\Injector\Injector:
  # Configure the CWP proxy if defined
  Embed\Http\DispatcherInterface:
    class: Embed\Http\CurlDispatcher
    constructor:
      config:
        # CURLOPT_PROXY = 10004
        10004: '`SS_OUTBOUND_PROXY`'
        # CURLOPT_PROXYPORT = 59
        59: '`SS_OUTBOUND_PROXY_PORT`'

  # Provide dispatcher to Embeddable implementations
  SilverStripe\View\Embed\Embeddable:
    properties:
      Dispatcher: '%$Embed\Http\DispatcherInterface'

so:

  • not yet in core
  • not working ;-( despite config being present

We are on:

cwp/cwp                                                  2.1.1             
cwp/cwp-core                                             2.1.1             
cwp/cwp-pdfexport                                        1.0.1             
cwp/cwp-recipe-cms                                       2.1.1             
cwp/cwp-recipe-core                                      2.1.1 

@robbieaverill
Copy link
Contributor Author

@sunnysideup just checking you resolved this by copying the config into your project as noted on the other issue?

@sunnysideup
Copy link
Contributor

@robbieaverill - yes, that is now working.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants