Page MenuHomePhabricator

Sahajsk (Sahaj Khandelwal)
User

Projects

User does not belong to any projects.

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Sunday

  • Clear sailing ahead.

User Details

User Since
Feb 8 2020, 8:10 AM (42 w, 6 d)
Availability
Available
IRC Nick
sahajsk
LDAP User
Sahajsk
MediaWiki User
Sahajsk [ Global Accounts ]

Recent Activity

Wed, Dec 2

Sahajsk added a comment to T268426: Add Anvesha application to translatewiki.net.
  1. Can I make the changes directly in the repository's qqq.json? It seems like I need permission to make any change using translatewiki.net.
  2. We are working on this, but hopefully, it won't affect the translations, will it?

I don't have translatewiki.net account, but I'll ask if Yaron has one and let you know.

Wed, Dec 2, 11:53 AM · Language-Team (Language-2020-October-December), translatewiki.net

Sat, Nov 28

Sahajsk added a comment to T268426: Add Anvesha application to translatewiki.net.

@abi_ I have changed the format to match the one in banana-i18n. Are there any other concerns?

Sat, Nov 28, 3:45 AM · Language-Team (Language-2020-October-December), translatewiki.net

Jul 9 2020

Sahajsk committed rEFLDe51943c6f606: Improve syntax (authored by Sahajsk).
Improve syntax
Jul 9 2020, 9:38 AM

Jun 16 2020

Sahajsk committed rEPFM6ce24d8a4fc6: Improve parsing to match only the called templates in multi page edit (authored by Sahajsk).
Improve parsing to match only the called templates in multi page edit
Jun 16 2020, 2:17 AM

May 11 2020

Sahajsk added a comment to T246380: Empty section causes later section to not be parsed correctly.

Yes, I am already onto it.
Presently I have implemented a workaround which displays a warning with the section name at the top and displays the form below( Sections might not be parsed correctly but showed as before this change).
Another option is to display just the error message and no form like


Can you please suggest me a warning message as per Mediawiki convention?

May 11 2020, 9:29 AM · Patch-For-Review, MediaWiki-extensions-Page_Forms

May 9 2020

Sahajsk added a comment to T246380: Empty section causes later section to not be parsed correctly.

I guess the issue is different section names in form definition and the page.
Form: The community/communities behind this submission.
Page: The communities behind this submission.

May 9 2020, 2:25 AM · Patch-For-Review, MediaWiki-extensions-Page_Forms

May 8 2020

Sahajsk added a comment to T246380: Empty section causes later section to not be parsed correctly.

Sure I'll look for the issue and improvise the code.

May 8 2020, 11:39 PM · Patch-For-Review, MediaWiki-extensions-Page_Forms

Apr 27 2020

Sahajsk added a comment to T183213: Page Forms review checklist.

Will update the description after checking the feasibility and solving the issues.

Apr 27 2020, 8:55 AM · MediaWiki-extensions-Page_Forms
Sahajsk updated the task description for T183213: Page Forms review checklist.
Apr 27 2020, 8:53 AM · MediaWiki-extensions-Page_Forms

Apr 21 2020

Sahajsk updated the task description for T248066: Proposal: Remove use of jQuery UI from Page Forms.
Apr 21 2020, 4:49 AM · Google-Summer-of-Code (2020)
Sahajsk added a comment to T246088: Fix for handling of sections with special characters in their name such as "(", ")", "+".

I think it has been resolved here T246380

Apr 21 2020, 4:47 AM · Patch-For-Review, MediaWiki-extensions-Page_Forms

Apr 20 2020

Sahajsk set IRC Nick to sahajsk on Sahajsk.
Apr 20 2020, 12:13 AM

Apr 17 2020

Sahajsk updated subscribers of T246380: Empty section causes later section to not be parsed correctly.

@Yaron_Koren I can't figure out why it isn't working for you even if we are doing the same things, so I have attached my form and page definitions here.
Form definition:

<noinclude>
This is the "Gadgets" form.
To create a page with this form, enter the page name below;
if a page with that name already exists, you will be sent to a form to edit that page.
Apr 17 2020, 3:18 AM · Patch-For-Review, MediaWiki-extensions-Page_Forms

Apr 12 2020

Sahajsk added a comment to T246380: Empty section causes later section to not be parsed correctly.

If I make the change now will it show?

Apr 12 2020, 1:18 PM · Patch-For-Review, MediaWiki-extensions-Page_Forms
Sahajsk added a comment to T246380: Empty section causes later section to not be parsed correctly.

@Sparr I have uploaded a solution https://gerrit.wikimedia.org/r/c/mediawiki/extensions/PageForms/+/588150. I don't know why it isn't being displayed here. Please give it a try and tell me if it works.

Apr 12 2020, 12:42 PM · Patch-For-Review, MediaWiki-extensions-Page_Forms

Apr 10 2020

Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

Sorry for so many doubts but I have not researched about dates in this depth before.
Just two more issues an I'll be ready for another patch.
How should these dates be interpreted?

  1. March 14( as 14 of March or March of the year 14 )
  2. 11/09/08 ( what order of year, month and day)
Apr 10 2020, 12:33 AM · MediaWiki-extensions-Page_Forms

Apr 9 2020

Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

I was going through the solutions, but the best way is to ensure that the year input is in 4-digit format. In this way, the original code works fine.
Moreover, this will reduce confusion. For example,

Apr 9 2020, 1:54 PM · MediaWiki-extensions-Page_Forms

Apr 8 2020

Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

I have looked for the following ways to handle all types of date formats:-

  1. If the year is input in 4 or 5 digit format then strtotime can take care.
  2. If we take years 0-69 as 2000-2069 and 70-99 as 1970-1999 then DateTime class can take care of all types of formats. So to specify year such as 62 we need to type 0062.

According to me, the second option fits well as usually when years are written in two-digit formats those are considered as specified above.
This might not solve this specific issue as desired but it will be able to handle any type of date format.

Apr 8 2020, 2:07 PM · MediaWiki-extensions-Page_Forms
Sahajsk added a comment to rEPFMf5852c559767: Revert 9cf560cf68fc - caused problems with some date formats.

@Yaron_Koren Could you please specify the date formats so I could try and improvise the code?

Apr 8 2020, 12:44 AM

Mar 31 2020

Sahajsk added a comment to T225179: Special:RunQuery lead to Bad title page when using a form since PF 4.5.1.

Thanks @Carchaias awaiting your response.
Still, I would live to reproduce this issue.@Yaron_Koren Please can you help me how to downgrade my PageForms version.

Mar 31 2020, 1:32 PM · MediaWiki-extensions-Page_Forms

Mar 30 2020

Sahajsk added a comment to T246188: Page Forms undefined error when using #formlink.

Thanks @Yaron_Koren
I have tried a few variants with #formlink and tried what was mentioned in the task description, but couldn't experience this.
@Madrigal84 I suggest you, please try this once again as this issue might be fixed.

Mar 30 2020, 9:58 AM · MediaWiki-extensions-Page_Forms
Sahajsk updated the task description for T248066: Proposal: Remove use of jQuery UI from Page Forms.
Mar 30 2020, 1:54 AM · Google-Summer-of-Code (2020)

Mar 29 2020

Sahajsk added a comment to T183213: Page Forms review checklist.
Mar 29 2020, 1:07 PM · MediaWiki-extensions-Page_Forms
Sahajsk added a comment to T246188: Page Forms undefined error when using #formlink.

I know it works with "target" but on the wiki it says
target= - shouldn't usually be used, but it sets the "target" page to be edited if you want to link to the editing of a specific page.
That is why I asked if I was doing something wrong

Mar 29 2020, 5:55 AM · MediaWiki-extensions-Page_Forms

Mar 28 2020

Sahajsk added a comment to T246188: Page Forms undefined error when using #formlink.

@Yaron_Koren I have written a statement as : -
{{#formlink:form=Gadgets|link text=Edit gadget|link type=button|query string=Gadgets[model]={{PAGENAME}} }}
Template: Gadgets
Form:Gadgets
Structure is something like


When I click the Edit gadget button it takes me to the following page:-

Can you please help me with what am I doing wrong?

Mar 28 2020, 4:22 AM · MediaWiki-extensions-Page_Forms

Mar 26 2020

Sahajsk added a comment to T225179: Special:RunQuery lead to Bad title page when using a form since PF 4.5.1.

Was this issue fixed in higher versions of PF as I don't seem to face this issue?

Mar 26 2020, 12:25 AM · MediaWiki-extensions-Page_Forms

Mar 25 2020

Sahajsk added a comment to T246188: Page Forms undefined error when using #formlink.

I tried to recreate the error by using #formlink parser function as mentioned in https://www.mediawiki.org/wiki/Extension:Page_Forms/Linking_to_forms#Using_#formlink, but I couldn't experience that error. I am using the same query as in the first example of the given link.
@Madrigal84 @Yaron_Koren Could you please help me if I might be missing some parameters?

Mar 25 2020, 1:21 AM · MediaWiki-extensions-Page_Forms

Mar 24 2020

Sahajsk committed rEPFM9cf560cf68fc: Make date field in PageForms handle ancient dates correctly (authored by Sahajsk).
Make date field in PageForms handle ancient dates correctly
Mar 24 2020, 2:08 PM
Sahajsk updated subscribers of T248066: Proposal: Remove use of jQuery UI from Page Forms.
Mar 24 2020, 12:42 AM · Google-Summer-of-Code (2020)

Mar 23 2020

Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

$date = DateTime::createFromFormat('F Y', $date);
$d = $date->format('F Y');
This will be able to handle this.(F for full month name)
I will still be looking for a universal solution.

Mar 23 2020, 1:41 AM · MediaWiki-extensions-Page_Forms

Mar 22 2020

Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

Also, I have another solution. Since there seem to be only three date formats which are working we can use the above checking for each of these formats. These three formats are
Y: 2000
m Y: January 2002 (we can handle another language as well)
Y/m/d : 62/04/25
I might have missed some cases but I have tried all combinations in the date input.
For those cases as well we can apply the same condition.

Mar 22 2020, 12:25 PM · MediaWiki-extensions-Page_Forms
Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

Oh, it was a typo, works the same.
So should I make the changes?

Mar 22 2020, 12:18 PM · MediaWiki-extensions-Page_Forms
Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

If finally, strtotime($date) returns null we can check for another condition like:-
$date = DateTime::createFromFormat('Y/m/j', $date);
$d = $date->format('Y/m/d');
Now if $d is null then we return null (as everything is working now), and if it is true then it handles the case of years with less than four digits.
I have tried it, and it seems to work fine with all types of possible inputs of date.

Mar 22 2020, 11:54 AM · MediaWiki-extensions-Page_Forms
Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

Yes strtotime('62/04/03') gives no result but strtotime('00062/04/03') returns 1044297360

Mar 22 2020, 3:02 AM · MediaWiki-extensions-Page_Forms
Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

If the input is restricted to a fixed number of digits(here 5) we can add zeros in front of smaller numbers such as 00062

Mar 22 2020, 2:23 AM · MediaWiki-extensions-Page_Forms
Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

I came across another issue while working on the date input. When the input is set to something like{F31697409}(notice the year field with space), it is correctly displayed in the page{F31697411} but in "edit with form" it shows

.
So I suggest we should allow only specific inputs in the day and year fields, i.e. 1-31 in day field and 1-32767 in the year field.
This will resolve the issue with strtotime as well.

Mar 22 2020, 2:14 AM · MediaWiki-extensions-Page_Forms

Mar 21 2020

Sahajsk added a comment to T248066: Proposal: Remove use of jQuery UI from Page Forms.

@Yaron_Koren Can you please help me about with any discrepancy or enhancements that I could make to the proposal?

Mar 21 2020, 1:51 AM · Google-Summer-of-Code (2020)

Mar 20 2020

Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

I have searched for alternatives, but there doesn't seem to be any. Instead, since we already have testing for several date formats like Month YYYY or YYYY, we can create another test for ancient dates.

Mar 20 2020, 12:09 PM · MediaWiki-extensions-Page_Forms
Sahajsk updated the task description for T248066: Proposal: Remove use of jQuery UI from Page Forms.
Mar 20 2020, 7:01 AM · Google-Summer-of-Code (2020)

Mar 19 2020

Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

Yes, it is true it works fine on a 64-bit system. Somehow if I input the date as 0062/04/21 instead of 62/04/21 it works fine. So I think it just the matter of what dates are actually treated as correct by the strtotime() function.

Mar 19 2020, 1:58 PM · MediaWiki-extensions-Page_Forms
Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

@Yaron_Koren In the parseDate function we use a PHP function strtotime like:-
$seconds = strtotime( $date );
This function takes initial date as 1st January 1970, so returns null for dates earlier than this.
So instead of returning false when this function gives null, I suggest we should explode the date and return the corresponding values.

Mar 19 2020, 1:17 PM · MediaWiki-extensions-Page_Forms
Sahajsk created T248066: Proposal: Remove use of jQuery UI from Page Forms.
Mar 19 2020, 8:47 AM · Google-Summer-of-Code (2020)

Mar 15 2020

Sahajsk added a comment to T247407: Field date does not handle ancient dates correctly.

@Yaron_Koren While working on the issue I found the problem was in the statement
list( $year, $month, $day ) = self::parseDate( $date );
PHP parser functions take initial date as 1st January 1970. So I suggest instead of using parse date we should explode the date into individual day, month and year, something like this
list( $year, $month, $day ) = explode('/', $date);

Mar 15 2020, 9:59 AM · MediaWiki-extensions-Page_Forms

Feb 22 2020

Sahajsk added a comment to T242973: Special:CargoQuery autocompletion appearance should be standardized.

Thanks @Aklapper I just got the issue resolved. I was in the core directory instead of cargo directory.

Feb 22 2020, 1:43 PM · MediaWiki-extensions-Cargo
Sahajsk added a comment to T242973: Special:CargoQuery autocompletion appearance should be standardized.

@Yaron_Koren I made following two additions:
.ui-state-focus{

border: none!important;
background: #2a4b8d!important;
color: #fff!important;
margin:0px!important;

}

Feb 22 2020, 6:01 AM · MediaWiki-extensions-Cargo

Feb 21 2020

Sahajsk added a comment to T242973: Special:CargoQuery autocompletion appearance should be standardized.

@Yaron_Koren I went through the code and stylesheets and think the class "ui-state-focus" is creating the issue. For skin Vector it is present in :
https://gerrit.wikimedia.org/g/mediawiki/skins/Vector/+/e19f6da3e09f565cba7ff6189618c6d9d14d42a9/skinStyles/jquery.ui/jquery.ui.theme.css
After removing "ui-state-focus",it looks something like this.


The main problem is if we hover any of these links new class "ui-state-focus" is added to <a> . So if we stop that it would work fine.
Can you guide me further with the issue and if I may have missed something?
Thank you.

Feb 21 2020, 10:53 AM · MediaWiki-extensions-Cargo

Feb 20 2020

Sahajsk added a comment to T244730: Special:ListFiles shows usernames with underscores.

$userName = User::getCanonicalName( $temp_userName , false );
I have changed the statement to something like this.
Also should the condition to check if getCanonicalName returns false be removed or kept.

Feb 20 2020, 12:55 AM · good first task, MediaWiki-Special-pages

Feb 19 2020

Sahajsk added a comment to T242973: Special:CargoQuery autocompletion appearance should be standardized.

@Yaron_Koren When I click "Create data table" in template, it throws the following error:


Can you please help me out with this.

Feb 19 2020, 12:33 PM · MediaWiki-extensions-Cargo

Feb 18 2020

Sahajsk added a comment to T244730: Special:ListFiles shows usernames with underscores.

@matej_suchanek Can you help me with the cases when getCanonicalName return false? Also does the initial code handle the case of invalid username.

Feb 18 2020, 12:30 AM · good first task, MediaWiki-Special-pages

Feb 13 2020

Sahajsk added a comment to T241632: Remove use of jQuery UI from Page Forms.

@Yaron_Koren @Prondubuisi Thanks for the clarification , I'll take up one of them.

Feb 13 2020, 12:52 AM · Google-Summer-of-Code (2020), MediaWiki-extensions-Page_Forms

Feb 12 2020

Sahajsk added a comment to T241632: Remove use of jQuery UI from Page Forms.

@Yaron_Koren I wish to contribute to this projects but seems the microtasks are taken. Are there any other issues to be fixed or methods to contribute to the projects?
Thanks in advance

Feb 12 2020, 9:47 AM · Google-Summer-of-Code (2020), MediaWiki-extensions-Page_Forms

Feb 11 2020

Sahajsk added a comment to T244730: Special:ListFiles shows usernames with underscores.

@matej_suchanek Thanks for the reference. Once I set up the environment, I'll start working.

Feb 11 2020, 9:35 AM · good first task, MediaWiki-Special-pages

Feb 10 2020

Sahajsk added a comment to T244730: Special:ListFiles shows usernames with underscores.

I would like to work on this task.

Feb 10 2020, 1:08 PM · good first task, MediaWiki-Special-pages