pythondjangowagtailoembed

Wagtail CMS: Embeds cannot be found for all sources except YouTube


I have started using Wagtail as an alternative to PHP solutions. I installed Wagtail following the docs and a small tutorial to get started. I have no custom settings in my settings/base.py concerning the WAGTAILEMBEDS_FINDERS.

The only changes I made so far to the Home Page:

from django.db import models

from wagtail.core.models import Page
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel

class HomePage(Page):
    templates = "home/home_page.html"
    banner_title = models.CharField(max_length=100, blank=False, null=True)
    banner_imgname = models.CharField(max_length=100, blank=False, null=True)
    body = RichTextField(blank=True)
    content_panels = Page.content_panels + [
        FieldPanel("banner_title"),
        FieldPanel("banner_imgname"),
        FieldPanel('body', classname="full"),
    ]

And this is the simple home_page template:

{% extends "base.html" %}
{% load static %}
{% load wagtailcore_tags %}

{% block body_class %}template-homepage{% endblock %}

{% block content %}
    {{ self.banner_title }}
    {{ self.imgname_title }}
    {{ page.body|richtext }}
{% endblock %}

All simple outputs of text from a CharField and RichTextField work fine, but the embed feature, which I -unfortunately - need the most (blog sharing all kinds of embed stuff), does not work properly.

I tried Soundcloud, Deviantart, Vimeo, Instagram. Only YouTube embeds. (To confirm there are no other restrictions for the chosen links I embedded them in an editor of a WP installation (sorry :-)).

Screenshot embed failing

There is also this issue on github, but it is not just an Instagram issue but a general embed problem I think. I followed the given links provided there but did not find a solution, everything "seems" right.

Question is: Is it an issue? Do I do sth. wrong? Are there reliable, stable workarounds using other editors you can recommend? I'd really love to stick to Wagtail and am willing to put more effort in learning, but need this feature quite desperately.

My Setup:

EDIT:

I thought this is a RichTextField issue only, but I tried another way of embedding with {% embed %} tags like suggested in the docs which also does not work for me: In models.py I added:

embedcontent_url = models.URLField("Embed Content URL", blank=True)

And in the home_page.html:

{% load wagtailembeds_tags %}

{% embed page.embedcontent_url %}

And again: If I save a YouTube link in my URLfield, it embeds the video in the frontend, but if I choose any other default provider it would just render nothing.

Any ideas, if I need to import or extend anything else in order to make embeds work?

THANKS

Maybe related: "How Embed Gist in Wagtail?"


Solution

  • Ok, so the problem got solved via the github issue thread.

    The problem was not Wagtail related (but OSX / Python SSL certificate related), but I'll post the solution in case others might run into this too.

    I had to go to the folder of my Python installation (/Python 3.7 in my case) and double click the file Install Certificates.command.

    After that I restarted the server and the embed requests are now working fine and returning the expected result.