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

[PROD] Embedded content appears only partially on Region pages #1461

Open
tovari opened this issue Nov 11, 2024 · 5 comments
Open

[PROD] Embedded content appears only partially on Region pages #1461

tovari opened this issue Nov 11, 2024 · 5 comments
Assignees
Labels
type: bug Something isn't working

Comments

@tovari
Copy link

tovari commented Nov 11, 2024

There is an embedded dashboard on the APAC region page that isn't show up correctly on the frontend.
https://go.ifrc.org/regions/2/additional-info

Image

It seems, all is okay on the admin page, the snippet Preview shows it also correctly:
https://goadmin.ifrc.org/en/admin/api/region/2/change/

Image

@tovari tovari added the type: bug Something isn't working label Nov 11, 2024
@samshara
Copy link
Member

@tovari
The API endpoint https://goadmin.ifrc.org/api/v2/region/2/ is currently returning the HTML snippet for the "additional info" that includes an <iframe> wrapped in a <p> tag:

<p><iframe title="Landing Page GO" src="https://app.powerbi.com/view?r=eyJrIjoiMjExY2I0MDgtYjVhZC00MGFkLTlmOTAtMzdjODU0MzM3NzA2IiwidCI6ImEyYjUzYmU1LTczNGUtNGU2Yy1hYjBkLWQxODRmNjBmZDkxNyIsImMiOjh9" width="1500" height="900" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>

The <p> tag encapsulating the <iframe> is causing styling issues.
To resolve this, we should remove the <p> tag, ensuring only the <iframe> is returned.

cc @szabozoltan69

@tovari
Copy link
Author

tovari commented Nov 11, 2024

weirdly, I cannot remove it in the code editor on the admin page.

@szabozoltan69
Copy link
Collaborator

szabozoltan69 commented Nov 11, 2024

From a database string update I could cut the <p> and </p> manually. It works now.
Nevertheless we should find a long time solution:
a) removing from Django code this mandatory <p> tag-pair
b) or (since ^ this may have some sense) fix the CSS system to be able to live with it.

@szabozoltan69
Copy link
Collaborator

(Not sure why these cc @szabozoltan69 references from go-web-app do not appear in my emails. The go-api side ones do.)

@tovari tovari closed this as completed Nov 11, 2024
@tovari tovari reopened this Nov 12, 2024
@tovari
Copy link
Author

tovari commented Nov 12, 2024

@samshara, interestingly the Additional info tab works differently on Staging and on Prod.
Stage:
https://go-stage.ifrc.org/regions/2/additional-info
Image

Prod:
Image

Both cases the code is the same:
<p><iframe src="https://app.powerbi.com/view?r=eyJrIjoiMjExY2I0MDgtYjVhZC00MGFkLTlmOTAtMzdjODU0MzM3NzA2IiwidCI6ImEyYjUzYmU1LTczNGUtNGU2Yy1hYjBkLWQxODRmNjBmZDkxNyIsImMiOjh9" width="1500" height="1542" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants