Skip to content

Custom author name breaks when it's a template #3205

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

Open
samwilson opened this issue Nov 14, 2019 · 9 comments
Open

Custom author name breaks when it's a template #3205

samwilson opened this issue Nov 14, 2019 · 9 comments

Comments

@samwilson
Copy link

Summary:

The custom author name setting expects a username, unlike for example the similar field in UploadWizard. For example, when setting a custom author name that contains a template, it is wrapped in a User link.

For example, this revision contains:

|author=[[User:{{User:Samwilson/photographer|camera=g6}}|{{User:Samwilson/photographer|camera=g6}}]]

Steps to reproduce:

  1. Set a custom author name to a non-username string.
  2. Upload a photo.
  3. View the photo on Commons and look at the author= field.

It should only treat the custom author name as a username if it actually is. I'm not sure how UploadWizard does it, but the feature works well there.

Device and Android version:

  • LG G6

What make and model device (e.g., Samsung J7) did you encounter this on?
What Android version (e.g., Android 4.0 Ice Cream Sandwich or Android 6.0 Marshmallow) are you running?
Is it the stock version from the manufacturer or a custom ROM ?

Commons app version:

  • 2.11.0~93b948d20

Would you like to work on the issue?

No.

@avivith
Copy link

avivith commented Mar 11, 2020

Hi. Is this bug solved already, or should I work on it?

@samwilson
Copy link
Author

I'm not sure (I'm trying to test with 2.12.3 but every upload is failing and there's nothing in the logs).

@misaochan
Copy link
Member

@samwilson Oh dear. When you say there's nothing in the logs, do you mean that you tried Settings > Send Log File, but the email had no attachment?

Could I please ask that you do a fresh install (uninstall the app and install the Play Store version again), and see if that solves your problem? If not, we have a lot of brainstorming to do. :/

@samwilson
Copy link
Author

@misaochan thank you! that worked, now it's uploading properly again! And no, the logs weren't empty, but all they had for the current day was e.g. [file-logging-thread-1] [ContributionsSyncAdapter] : Received image File:2019-07-12 Fremantle Bowling Club, 4.jpg and nothing about uploading.

Anyway, the issue at hand still exists; custom author names can't contain templates.

@misaochan
Copy link
Member

Thanks for the clarification, @samwilson . :)

@avivith The bug is yours, please keep us updated on your progress!

@avivith
Copy link

avivith commented Mar 23, 2020

Sadly, I'm a little sick and don't manage to work currently. I hope someone else would solve this issue.

@avivith avivith removed their assignment Mar 23, 2020
@misaochan
Copy link
Member

Thanks for letting us know @avivith , hope you feel better soon.

@gupta-anmol
Copy link
Contributor

@misaochan Can you explain what exactly a "non-username" string is that Sam refers to? Also, I didn't quite understand how someone is to go about fixing this. Should we not allow the user to set the "non-username" string as a custom author name?

@samwilson
Copy link
Author

The string I get the bug with is {{User:Samwilson/photographer|camera=g6}}, i.e. anything that's not a username, because the app then takes that string and puts it into [[User:x|x]] (where x is the string).

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

6 participants