User Details
- User Since
- Feb 8 2020, 8:10 AM (261 w, 6 d)
- Availability
- Available
- IRC Nick
- sahajsk
- LDAP User
- Sahajsk
- MediaWiki User
- Sahajsk [ Global Accounts ]
Feb 1 2021
I couldn't reproduce the bug in Page Forms 5.1-alpha with MW 1.36.0-alpha.
Dec 2 2020
- 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.
- 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.
Nov 28 2020
@abi_ I have changed the format to match the one in banana-i18n. Are there any other concerns?
May 11 2020
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 9 2020
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 8 2020
Sure I'll look for the issue and improvise the code.
Apr 27 2020
Will update the description after checking the feasibility and solving the issues.
Apr 21 2020
I think it has been resolved here T246380
Apr 20 2020
Apr 17 2020
@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 12 2020
If I make the change now will it show?
@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 10 2020
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?
- March 14( as 14 of March or March of the year 14 )
- 11/09/08 ( what order of year, month and day)
Apr 9 2020
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 8 2020
I have looked for the following ways to handle all types of date formats:-
- If the year is input in 4 or 5 digit format then strtotime can take care.
- 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.
Mar 31 2020
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 30 2020
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 29 2020
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 28 2020
@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 26 2020
Was this issue fixed in higher versions of PF as I don't seem to face this issue?
Mar 25 2020
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 24 2020
Mar 23 2020
$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 22 2020
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.
Oh, it was a typo, works the same.
So should I make the changes?
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.
Yes strtotime('62/04/03') gives no result but strtotime('00062/04/03') returns 1044297360
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
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 21 2020
@Yaron_Koren Can you please help me about with any discrepancy or enhancements that I could make to the proposal?
Mar 20 2020
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 19 2020
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.
@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 15 2020
@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);
Feb 22 2020
Thanks @Aklapper I just got the issue resolved. I was in the core directory instead of cargo directory.
@Yaron_Koren I made following two additions:
.ui-state-focus{
border: none!important; background: #2a4b8d!important; color: #fff!important; margin:0px!important;
}
Feb 21 2020
@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 20 2020
$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 19 2020
@Yaron_Koren When I click "Create data table" in template, it throws the following error:
Can you please help me out with this.
Feb 18 2020
@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 13 2020
@Yaron_Koren @Prondubuisi Thanks for the clarification , I'll take up one of them.
Feb 12 2020
@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 11 2020
@matej_suchanek Thanks for the reference. Once I set up the environment, I'll start working.
Feb 10 2020
I would like to work on this task.