Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Reader: unexpanded (third party) shortcodes are shown in post content #796

Open designsimply opened 8 years ago

designsimply commented 8 years ago

Raised by @bluefuton

On the full post view, we should not show unexpanded shortcodes.

For example, in http://wordpress.com/read/post/feed/33151/723955414, we display:

[cfsp key=“getamac.jpg”]”

screen shot 2015-06-12 at 11 47 31

[tc_aol_on code="519068927"]

screen shot 2015-09-11 at 14 23 15

Note from @blowery

Anyone who fetches content via the REST API is going to see this problem.

designsimply commented 8 years ago

The time shortcode also has this problem:

[time]10/29/2015 2:10pm CDT[/time]
blowery commented 8 years ago

Doesn't look like the time shortcode works on general wpcom blogs. Is that a special one?

blowery commented 8 years ago

This may be fixed... Shortcode expansion for vips was fixed or avoided a while ago

blowery commented 8 years ago

Closing this for now as I can't find any more instances of it. If we find some, we can reopen.

bluefuton commented 8 years ago

Still seeing this one. For example: http://calypso.localhost:3000/read/post/feed/33932/885827042

screen shot 2015-12-14 at 10 10 05
designsimply commented 8 years ago

Another case was reported in #1557 for [pullquote]

From the Reader on the web:

pullquote-on-web

From the Reader on iOS:

pullquote example

/hat tip @meremagee for the report and images

lancewillett commented 8 years ago

Bug scrubbing today, this is not solved yet on Longreads blog. Testing with Mac-n-Chrome.

wp-admin editor

screen shot 2016-04-07 at 17 00 40

Reader post view, URL: https://wordpress.com/read/feeds/22973954/posts/973158663

screen shot 2016-04-07 at 17 01 04
bluefuton commented 6 years ago

@mzorz reports:

This site has an fb_vid shortcode that shows up in the Reader, and we can observe this happens both on Android and iOS (haven’t tested the web). It can be easily added to the apps by following tag ‘fujifilm’. The particular Post where this happens is this http://www.photographinggod.com/2018/01/09/hands-on-with-the-fujifilm-gfx-medium-format-camera-system/

screenshot_20180110-093744

eliorivero commented 6 years ago

There's a shortcode googlemaps that's not being rendered in the Reader. That shortcode has been around for years in wpcom so I thought it would be correctly rendered and inserted it when I composed the post in Calypso, but it's not and now the post is looking like this in the Reader, both in mobile and web or desktop.

Mobile

googlemaps

Web/desktop

captura de pantalla 2018-01-23 a la s 15 52 36
eliorivero commented 6 years ago

Found some shortcodes not stripped in content, both in mobile and in desktop:

shortcodes

Desktop

captura de pantalla 2018-02-22 a la s 11 11 50

Found in https://wordpress.com/read/blogs/131129977/posts/129846

rachelmcr commented 6 years ago

@bluefuton what do you think of raising the priority on this one? It's set as low priority but has received a number of reports and is a pretty ugly experience.

bluefuton commented 6 years ago

@rachelmcr good call - I'll remove the low priority label.

Noting that @blowery recently solved a similar problem in notifications with D9324-code, and intends to add some content caching to Reader endpoints in D8829-code, which may be related.

eliorivero commented 6 years ago

One more: the caption shortcode:

imagen subida desde ios

westi commented 6 years ago

Related p5PDj3-4lb-p2 - portfolio shortcode

danjjohnson commented 5 years ago

Another one in 1859970-zen for Visual Composer, e.g: https://wordpress.com/read/blogs/159335874/posts/17566

danjjohnson commented 5 years ago

Another one for Visual Composer here: 1896297-zen

eduardozulian commented 5 years ago

Another for a custom plugin when reading one of their posts on a mobile device 15900584-hc

anaemnesis commented 4 years ago

Reported in 3184310-zen

julsyd commented 4 years ago

VC shortcodes appear in Reader: 3294121-zen

github-actions[bot] commented 3 years ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

bluefuton commented 3 years ago

Still an issue. In p5PDj3-4Sg-p2, @gibrown suggested reusing the Jetpack email processing for handling these.

lakellie commented 3 years ago

Another report in 4270958-zen for Visual Composer shortcodes

github-actions[bot] commented 2 years ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

github-actions[bot] commented 1 year ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

gibrown commented 1 year ago

very real

github-actions[bot] commented 1 year ago

Support References

This comment is automatically generated. Please do not edit it.

roo2 commented 1 year ago

I did a little bit of investigation on this, my understanding is that there was an original issue in 2015 where many built in wordpress shortcodes, such as [pullquote] and [caption] where not being rendered in the reader.

As far as I can tell, that issue is now completely(?) solved, but there remains an issue with shortcodes that are added by plugins such as Visual Composer.

That seems like a more fundamental problem, because the plugin is required to parse the shortcode into HTML content, and that plugin isn't running on wp.com, we are in a tricky situation.

If I understand @gibrown's suggestion here p5PDj3-4Sg-p2#comment-7871 it's that we might be able to repurpose logic similar to how jetpack generates emails. This would parse the blog post in the context of the user's own blog, with all of their plugins available. It would feed the pre-parsed post content somewhere to be consumed by the wordpress.com reader.

It seems like a very tricky change to me (with my very limited knowledge of jetpack and reader's backend). I wouldn't expect this to be fixed any time soon unless it gets urgently prioritized.

gibrown commented 1 year ago

This would parse the blog post in the context of the user's own blog, with all of their plugins available.

You don't need to actually have the plugins available to parse the content. You just need to replicate the logic for the most popular shortcodes/plugins which we are already doing for emails so you could probably use the exact same code and generalize it.

roo2 commented 1 year ago

You just need to replicate the logic for the most popular shortcodes/plugins

Oh ok, I understand

We currently have quite a few tasks related to supporting different blocks and shortcodes. It seems to be a grey area how many different shortcodes we want to support in reader. And there is also a tension between providing a consistent reading experience and giving authors control over how their content is presented. It's not clear to me when we should stop.

gibrown commented 1 year ago

I think for emails we looked at the frequency of how often they are used.