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

File Block : Link To - attachment page issue #27121

Open
jd-alexander opened this issue Nov 19, 2020 · 0 comments
Open

File Block : Link To - attachment page issue #27121

jd-alexander opened this issue Nov 19, 2020 · 0 comments
Labels
[Block] File Affects the File Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended
Projects

Comments

@jd-alexander
Copy link
Contributor

Describe the bug

The details below were originally reported by @etoledom on this PR for the File Block mobile project.


I have found one weird behaviour (this happens in both WPiOS and WPAndroid):
The attachment link will sometimes be broken when I test it on a preview.

To reproduce
I took a look at the code and it looks good to me. I check the media object on web and it returns the correct link property:

    ...
    "status": "inherit",
    "type": "attachment",

-> "link": "https://mysitefortestingetoledom.wordpress.com/?attachment_id=3722",
"title": {
"raw": "bugreport-daisy-PKQ1.180917.001-2019-09-25-13-38-52.zip",
"rendered": "bugreport-daisy-PKQ1.180917.001-2019-09-25-13-38-52.zip"
},
...
On a next test, I checked out the first URL that is returned after uploading the file from mobile.
This link is working as expected:

"jetpack_shortlink" = "https://wp.me/a9nUvQ-Yb";

--> link = "https://mysitefortestingetoledom.wordpress.com/charactersheet_3pgs_-complete-2/";
"media_details" = {
After a while, (literally, I did nothing fancy) the link for the same file changed, and the previous one became broken:

"jetpack_shortlink" = "https://wp.me/a9nUvQ-Yb";

--> link = "https://mysitefortestingetoledom.wordpress.com/?attachment_id=3731";
"media_details" = {
I haven't been able to reproduce this same behaviour on web only, and again, I didn't spot anything wrong on the mobile side of the code.

It seems to happen when I upload a non-image file from mobile.

As a last test I tried uploading the same file, once from mobile and once from web.

First from mobile, it returned this link:
https://mysitefortestingetoledom.wordpress.com/christmas-time/

As I was expecting, it became broken and changed to:
https://mysitefortestingetoledom.wordpress.com/?attachment_id=3740

Then uploading the same file from web, it returned this link:
https://mysitefortestingetoledom.wordpress.com/christmas-time-1/

And this link seems to still be good now and haven't gotten broken.

My first guess is that we are doing something different with the upload request, maybe we are sending some different parameters. Or perhaps the backend is treating differently files uploaded from web and from mobile.

Expected behavior
The link should never be broken and the behavior should be consistent with the web.

@jd-alexander jd-alexander added Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Block] File Affects the File Block labels Nov 19, 2020
@hypest hypest added this to Triage in Mobile Apps via automation Nov 23, 2020
@hypest hypest moved this from Triage to In progress in Mobile Apps Nov 23, 2020
@jordesign jordesign added the [Type] Bug An existing feature does not function as intended label Aug 17, 2023
@twstokes twstokes moved this from In progress to To do in Mobile Apps May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] File Affects the File Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended
Projects
Mobile Apps
  
To do
Development

No branches or pull requests

3 participants