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

Tags are being injected into WordPress? #1105

Closed
eiland-asbl opened this issue Dec 19, 2024 · 12 comments
Closed

Tags are being injected into WordPress? #1105

eiland-asbl opened this issue Dec 19, 2024 · 12 comments

Comments

@eiland-asbl
Copy link

Quick summary

Not sure where it is coming from but i have a sneaky suspicion new tags are being injected into my blog through activitiypub (or @akirk's friends).
Im encoutering it on two instances.

Steps to reproduce

Check your https://blog.com/wp-admin/edit-tags.php

What you expected to happen

No unknown tags

What actually happened

Many unknown tags, not linked to posts

Impact

One

Available workarounds?

No but the platform is still usable

Logs or notes

No response

@pfefferle
Copy link
Member

Can you give us some examples? Are the tags look like color codes for example?

@akirk
Copy link
Member

akirk commented Dec 20, 2024

Sorry about this, I checked and I can confirm that it's the Friends plugin. Resp. WordPress seems automatically create tags if a hashtag is included in the post, on the wp-admin tag page it just doesn't display it because it only displays post_type post there but I checked and the friend posts are tagged with it.

Let's continue in akirk/friends#418.

@akirk akirk closed this as completed Dec 20, 2024
@akirk
Copy link
Member

akirk commented Dec 20, 2024

Oh, it's the ActivityPub plugin after all, not Friends:
https://github.com/Automattic/wordpress-activitypub/blob/trunk/includes/class-hashtag.php#L65

@akirk akirk changed the title Tags are being injected into Wordpress? Tags are being injected into WordPress? Dec 20, 2024
@akirk akirk reopened this Dec 20, 2024
@pfefferle
Copy link
Member

But it adds them to the post!

@akirk
Copy link
Member

akirk commented Dec 20, 2024

They are linked to the posts in question indeed, just the View link in wp-admin/edit-tags.php doesn't show them for Friends posts because it's a different post type.

I think part of the confusion is that tags appear in wp-admin/edit-tags.php that were not entered by any WordPress author.

@nickbohle
Copy link

Hi,
I noticed this issue yesterday as well when I shared a podcast episode. The link I included had the title: “Episode #123 - Lorem ipsum…”. Upon publishing, the system automatically created the tag #123.

I also remembered encountering a similar issue with color codes in the past.

To address this, I edited the post and manually removed the #123 tag. Then, I went to Admin > Posts > Tags and deleted the tag. Additionally, I navigated to Admin > Settings > ActivityPub > Settings and unchecked the option: “Add hashtags in the content as native tags and replace the #tag with the tag link.”

Since tagging on weblogs works differently (Background: https://fewertags.com/research/ )than on social media, could this unchecking be the solution?

Thanks!

@akirk
Copy link
Member

akirk commented Dec 20, 2024

FWIW in the next version of Friends you'll be able to view the tagged posts on the frontend: akirk/friends#419

@pfefferle
Copy link
Member

This was a bug, but should be fixed now! We do no longer parse hashtags in HTML elements, like links!

@nickbohle can you verify that this does no longer happen?

@nickbohle
Copy link

This was a bug, but should be fixed now! We do no longer parse hashtags in HTML elements, like links!

@nickbohle can you verify that this does no longer happen?

@pfefferle

Yes, I can confirm that. I updated an existing post and published a new one. (Version 4.5.1)

@pfefferle
Copy link
Member

You can confirm that it no longer happens?

@nickbohle
Copy link

You can confirm that it no longer happens?

Yes, I can confirm that it no longer happens.

@pfefferle
Copy link
Member

So I will close this for now. @nickbohle please re-open if you find some more cases...

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

No branches or pull requests

4 participants