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

Favorite Pages: Unable to create bookmark image for /members page #24916

Closed
wezell opened this issue May 11, 2023 · 3 comments · Fixed by #24936 or #24993
Closed

Favorite Pages: Unable to create bookmark image for /members page #24916

wezell opened this issue May 11, 2023 · 3 comments · Fixed by #24936 or #24993

Comments

@wezell
Copy link
Contributor

wezell commented May 11, 2023

Parent Issue

#22343

Problem Statement

I am trying to create a bookmark for a page that does not have CMS_ANONYMOUS view on it and we cannot seem to get a thumbnail of it.

Screen Shot 2023-05-11 at 1 45 01 PM

Steps to Reproduce

To reproduce:

  • in edit mode, browse to "members only" page.
  • try to make a bookmark for it.
  • You will see the preview fail to generate.

Acceptance Criteria

Be able to create a thumbnail for any page in the system.

dotCMS Version

23.06

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@fmontes fmontes changed the title Unable to create bookmark image for /members page Favorite Pages: Unable to create bookmark image for /members page May 11, 2023
@fmontes
Copy link
Member

fmontes commented May 11, 2023

It looks like the problem is with the way the theme loads the Google Fonts it crashes the library, we can update the theme and the starter.

@alfredo-dotcms
Copy link
Contributor

seems like in that template there's a JS snippet that breaks the thumbnail generation process:

<script type="text/javascript">!function(e,n,t){"use strict";var o="https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700,800",r="__3perf_googleFonts_cf86d";function c(e){(n.head||n.body).appendChild(e)}function a(){var e=n.createElement("link");e.href=o,e.rel="stylesheet",c(e)}function f(e){if(!n.getElementById(r)){var t=n.createElement("style");t.id=r,c(t)}n.getElementById(r).innerHTML=e}e.FontFace&&e.FontFace.prototype.hasOwnProperty("display")?(t[r]&&f(t[r]),fetch(o).then(function(e){return e.text()}).then(function(e){return e.replace(/@font-face {/g,"@font-face{font-display:swap;")}).then(function(e){return t[r]=e}).then(f).catch(a)):a()}(window,document,localStorage);</script>

@josemejias11
Copy link

Approved QA - Tested on 23.06_003371a4_SNAPSHOT // Docker // macOS 13.0 // FF v113.0

jdotcms pushed a commit that referenced this issue May 26, 2023
… page - Fix for Firefox (#24993)

* Fixing issue with Firefox

* Adding firefox fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment