WPAFC / afch

Yet another Articles for creation helper script -- ACTIVE DEVELOPMENT NO LONGER HAPPENS IN THIS REPOSITORY AND HAS MOVED TO
https://github.com/WPAFC/afch-rewrite
9 stars 3 forks source link

double namespace? #170

Open theopolisme opened 10 years ago

theopolisme commented 10 years ago

The namespace parameter is being doubled at https://test.wikipedia.org/w/index.php?title=Wikipedia_talk:Articles_for_creation/sandbox&diff=179896&oldid=179895

wikipedia-mabdul commented 10 years ago

ah good catch. problem found

wikipedia-mabdul commented 10 years ago

done https://test.wikipedia.org/w/index.php?title=MediaWiki%3AGadget-afchelper.js%2Fsubmissions.js&diff=179903&oldid=179898

(only a problem at testwp atm - so no push/commit until I have the reviewing stuff finished)

wikipedia-mabdul commented 10 years ago

BTW: https://test.wikipedia.org/w/index.php?title=Wikipedia_talk%3AArticles_for_creation%2Fsandbox&diff=179910&oldid=179908

was finally done, what me drove nuts is following code change: https://test.wikipedia.org/w/index.php?title=MediaWiki%3AGadget-afchelper.js%2Fsubmissions.js&diff=179909&oldid=179905

So: JavaScript IS stupid. You only have to know how to handle the tool. -.-

theopolisme commented 10 years ago

Not pushed to live yet ;)

Could you go ahead and commit this to github? It actually is NOT "only a problem at testwp atm"....look at the source, it is also a problem with lastest dev script iirc

wikipedia-mabdul commented 10 years ago

and for the next commit (tomorrow?) we should use wgnamespacenumber (or so) so that cleanup doesn't always do a null edit because not realizing that the content is actually the same (or replace the just fetched code with {{subst:namespacenumber}})

Technical-13 commented 10 years ago

I don't think we should change the number. It may have been submitted in 2 and moved to 5, and I can't think of a good reason to lose that information. Although, on the flip side, I don't know why we have a ns= parameter at all. Does it really matter where the draft was submitted?

wikipedia-mabdul commented 10 years ago

the information isn't lost. it is still in the history of the page. moreover it depends on the ns parameter which template of Template:Afc submission/created is displayed.

Technical-13 commented 10 years ago

Why does it depend on where the draft was submitted? Shouldn't it depend on whatever the current namespace is? If I wrote a draft and submitted in in my User: space (ns=2) and then moved it to Portal: (ns=100), why would it not display an error that it is in the wrong place? This can be done without this parameter by simply using the Namespace detect template (which uses {{NAMESPACENUMBER}} iirc), and there is no need for extra parameter.

wikipedia-mabdul commented 10 years ago

How do you want to determine if a page should display either https://en.wikipedia.org/wiki/Template:AFC_submission/created or https://en.wikipedia.org/wiki/Template:AFC_submission/misplaced ? BTW: I was boldly merging the two templates two years ago ( https://en.wikipedia.org/w/index.php?title=Template%3AAFC_submission%2Fcreated&diff=452521471&oldid=414858548 )

theopolisme commented 10 years ago

@wikipedia-mabdul is this resolved by 1da4883?

wikipedia-mabdul commented 10 years ago

yes it is.