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

Embetty-Mastodon not working #425

Closed
schablonski opened this issue Mar 22, 2024 · 4 comments
Closed

Embetty-Mastodon not working #425

schablonski opened this issue Mar 22, 2024 · 4 comments

Comments

@schablonski
Copy link

I have a working Embetty-instance for years with my Wordpress-Blog. Now I want to update to embed Mastodon-posts.

General information

  • embetty version: 3.2.5
  • embetty.js version: 4.0.0
  • Node.js version: 18.19,0
  • Operating system name and version: Debian Bookworm
  • Browser name and version: Firefox 123.0.1

Steps to reproduce the behaviour

I updated the docker-component and the embetty.js
Embetty is working for Youtube-videos.

Expected behaviour

I added something like this:

and the Toot should be displayed.

Actual behaviour

The Toot is not displayed.

@StevenKowalzik
Copy link
Member

Hey, I can't reproduce this behaviour. Can you provide more information to replicate your issue?

@schablonski
Copy link
Author

Docker:

docker pull heiseonline/embetty-server
Using default tag: latest
latest: Pulling from heiseonline/embetty-server
Digest: sha256:3f24c608d681b84dfc535b3a435faefcdd7aaf262d3968c529787b7fce471861
Status: Image is up to date for heiseonline/embetty-server:latest
docker.io/heiseonline/embetty-server:latest

embetty.js

/*!
 * @heise/embetty - v4.0.0 - Wed, 08 Mar 2023 14:21:11 GMT
 * https://github.com/heiseonline/embetty
 * Copyright (c) 2023 Heise Medien GmbH & Co. KG
 * Contributors: Philipp Busse, Jan Hofmann, Alexander Pluhar
 * Licensed under the MIT license

Wordpress-Posting (HTML)
<embetty-mastodon status="https://social.heise.de/@heiseonline/112139289247357072"></embetty-mastodon>

functions.php in Wordpress-child-theme (I don't where I get this from)

<?php
function theme_enqueue_styles() {

    $parent_style = 'parent-style';

    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style )
    );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
wp_register_script( 'embetty', '/embetty/embetty.js');
wp_enqueue_script( 'embetty' );

add_filter( 'rest_authentication_errors', function( $result ) { if ( ! empty( $result ) ) { return $result;
  } 
  if ( ! is_user_logged_in() ) { return new WP_Error( '401', 'not allowed.', array('status' => 401) );
  } 
  return $result;
});

With links to youtube-videos Embetty is showing a local preview-image.

@StevenKowalzik
Copy link
Member

StevenKowalzik commented Sep 6, 2024

Hi, i see the confusion. @heise/embetty@4.0.0 is not the current version of the frontend part of embetty anymore, which does not offer Mastodon support. Since we merged the embetty projects into this monorepo, @embetty/component@2.3.1 is the latest version of the frontend component. We mistakingly still offer the latest release of the old package to download on this page. We will update this repository as soon as we find time. To get this working, please use https://www.npmjs.com/package/@embetty/component in your project or build embetty.js yourself with this repository.

Update: I added the latest release of embetty/component here: https://github.com/heiseonline/embetty/releases/tag/%40embetty%2Fcomponent%402.3.1

@StevenKowalzik
Copy link
Member

see above

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

No branches or pull requests

2 participants