jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Gutenberg: Tags Added to Pages and Portfolio Projects are Converted to Numbers

Open julsyd opened this issue 7 years ago • 36 comments

Some WP.com themes add Tags to Pages and Portfolio Projects, usually for featured content. When a Tag is added to a Portfolio Project, it is converted to a string of numbers. I was able to reproduce on WP.com simple sites, but not AT sites.

Steps to reproduce

  1. On a WP.com simple site, activate the Rebalance theme.
  2. Go to My Site > Portfolio and add a new Portfolio Project.
  3. Add a Tag to the Portfolio Project.
  4. Publish or Update the Portfolio Project.

What I expected

I expected the Portfolio Project to have the Tag I typed in.

What happened instead

The Tag I typed in was converted to a string of numbers.

Browser / OS version

Chrome Version 72.0.3626.119 (Official Build) (64-bit) macOS Mojave version 10.14.3

Screenshot / Video

tag-numbers

Context / Source

#user-report #manual-testing

julsyd avatar Mar 07 '19 16:03 julsyd

I ran into this as well on 11032083-hc (1861597-zen), but for pages. I tested extensively and it happens on:

  • Gutenberg on Calypso (Gutenframe)
  • Gutenberg on wp-admin

It does not happen for pages created on:

  • The classic-editor on wp-admin
  • Calypso editor on Calypso

WordPress.com Business plan site used for all tests.

Google Chrome Version 72.0.3626.109 (Official Build) (64-bit) with macOS 10.14.2 - Mac OS Mojave, if that is important.

arunsathiya avatar Mar 08 '19 07:03 arunsathiya

10938062-hc / cc @nagpai's report.

arunsathiya avatar Mar 08 '19 07:03 arunsathiya

Just had a case myself in 11048610-hc

sandymcfadden avatar Mar 08 '19 14:03 sandymcfadden

Another one reported here: 11147919-HC

In 1858292-zen: feedback that this bug is impacting SEO

sourourn avatar Mar 12 '19 08:03 sourourn

I've got another one here: 7072281-HC

I did find another workaround:

  1. Remove featured tag from Customize > Featured Content.
  2. Add a tag to pages that should be featured in word form. So I added "featured" as the tag. That tag then gets converted to a number and should be the same on all pages.
  3. Note the number and add it to Customize > Featured Content.

That worked as a temporary workaround on this particular site.

sstabrizi avatar Mar 12 '19 16:03 sstabrizi

Another reported here:

11191758-hc

katiebethbrown avatar Mar 13 '19 15:03 katiebethbrown

Another one here: 8088196-hc

wynwin avatar Mar 13 '19 17:03 wynwin

Another here: 11156634-hc

deancroyal avatar Mar 13 '19 17:03 deancroyal

Initial report was in #1857763-zen

drwpcom avatar Mar 14 '19 15:03 drwpcom

1880190-zen

User provided some step-by-step screenshots to reproduce.

erricgunawan avatar Mar 15 '19 07:03 erricgunawan

Re-shared the workaround by @sstabrizi here #1858292-zen and closed until it gets fixed.

zdenys avatar Mar 15 '19 10:03 zdenys

Another reported here: 11249841-hc

I tested this on my own site and also found that once it changes it to a number, it won't let me delete it.

I can recreate it by creating a new page as shown here: https://cld.wthms.co/I6VGFs

I have the Eris theme on a Premium site.

ccwalburn avatar Mar 15 '19 15:03 ccwalburn

Another case here 1883377-zen. Shared the temporary workaround from above.

zdenys avatar Mar 16 '19 11:03 zdenys

Another report in 1884795-zen.

julsyd avatar Mar 17 '19 13:03 julsyd

Another report in 1885144-zen

sourourn avatar Mar 17 '19 15:03 sourourn

Verified:

  • this isn't an issue with Classic
  • I can't replicate with posts
  • I can replicate with Rebalance and Portfolios on dotcom
  • I cannot replicate with Rebalance and Portfolios on a dotorg install (dotorg Rebalance doesn't seem to support tags on pages either?)

I think something's up with the POST API calls to https://public-api.wordpress.com/wp/v2/sites/:siteId/tags.

kwight avatar Mar 18 '19 19:03 kwight

Tags like these are getting created, then faithfully brought back to the interface (as opposed to it being an issue all in the UI).

Screen Shot 2019-03-18 at 12 58 10 PM

kwight avatar Mar 18 '19 20:03 kwight

Duplicate tags are being created with the name of the tag being the ID of the already-created tag.

  1. Add tag in the UI and hit Enter. The tag is added to the db via POST https://public-api.wordpress.com/wp/v2/sites/:siteId/tags?_envelope=1&_locale=user.
  2. Publish post. The ID of the above tag is included as form data in the call on publish to PUT https://public-api.wordpress.com/wp/v2/sites/:siteId/jetpack-portfolio/:postId?_envelope=1&_locale=user.

Screen Shot 2019-03-18 at 1 19 35 PM

kwight avatar Mar 18 '19 20:03 kwight

Hm, maybe related complications and background: p7jreA-20e-p2.

kwight avatar Mar 18 '19 20:03 kwight

Step 2 above (with the form data) looks like expected behaviour, since this is also how the working tags-on-posts performs. So the likely culprit is that PUT updates calling https://public-api.wordpress.com/wp/v2/sites/:siteId/jetpack-portfolio/postId (or maybe any CPT plus pages) are creating the tag[] value as a new name, rather than using them properly as tag IDs.

kwight avatar Mar 18 '19 20:03 kwight