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

JS optimizations break the relative path in documentcloud.adobe.com/view-sdk/main.js when using ADOBE PDF API Embed Script #4420

Closed
4 tasks
alfonso100 opened this issue Oct 12, 2021 · 0 comments · Fixed by #4421
Assignees
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting module: combine JS module: minify JS severity: moderate Feature isn't working as expected but has work around to get same value type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@alfonso100
Copy link
Contributor

Before submitting an issue please check that you’ve completed the following steps:
YES - Made sure you’re on the latest version
YES - Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
When using ADOBE PDF API Embed Script, if our JS optimizations are enabled, the file https://documentcloud.adobe.com/view-sdk/main.js is copied locally. But it contains a relative path to load /ViewSDKInterface.js so this causes a 404 error on that file when trying to load it: - https://jmp.sh/ljwo4Ox

To Reproduce
Steps to reproduce the behavior:

  1. Add the following code https://snippi.com/s/m7luycr
  2. Enable JS Minify, see the 404 error.
  3. Enable JS Combine, see the errors
  4. Exclude documentcloud.adobe.com/view-sdk/main.js from JS optimizations to solve the errors

Expected behavior
We should auto exclude documentcloud.adobe.com/view-sdk/main.js and from JS optimizations to prevent such issues

Screenshots
ViewSDKInterface.js is dynamically included within this file: https://documentcloud.adobe.com/view-sdk/main.js
https://jmp.sh/vhw43ms

Additional context
Ticket: https://secure.helpscout.net/conversation/1653397963/299819/

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@Tabrisrp Tabrisrp added 3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting module: combine JS module: minify JS severity: moderate Feature isn't working as expected but has work around to get same value type: bug Indicates an unexpected problem or unintended behavior labels Oct 14, 2021
@Tabrisrp Tabrisrp added this to the 3.10.1 milestone Oct 14, 2021
Tabrisrp pushed a commit that referenced this issue Oct 14, 2021
@Tabrisrp Tabrisrp mentioned this issue Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting module: combine JS module: minify JS severity: moderate Feature isn't working as expected but has work around to get same value type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants