kanasimi / CeJS

The project aims to develop a JavaScript module framework that is simple to use with some interesting features. 本計畫目標是建立一個簡單上手的 JavaScript 模組架構。
Other
59 stars 12 forks source link

Error: missingparam: The "to" parameter must be set. #11

Closed hugolpz closed 3 years ago

hugolpz commented 3 years ago

A bypass shown in #12.

Runing a Wikiapi move_page, I run into the following error :

Error: missingparam: The "to" parameter must be set.
    at /home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/admin.js:166:15
    at check_session_badtoken (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:189:4)
    at XMLHttp_handler (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:655:4)
    at IncomingMessage.<anonymous> (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/Ajax.js:2242:6)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1224:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
wiki_API_page: Not exists: [[User talk:Dragons Bot/Stop]]
The page to stop operation is not found ([[User talk:Dragons_Bot/Stop]]). The operation will continue as usual.
get_API_parameters: Cache wwwlingualibre: path=edit
wiki_API_query: 未登錄編輯?
/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:389
                throw new Error('wiki_API_query: 未登錄編輯?');
                ^

Error: wiki_API_query: 未登錄編輯?
    at wiki_API_query (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:389:11)
    at Timeout._onTimeout (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:335:5)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

the code I run is something such :

try{
    result = await targetWiki.move_page(
        listPageBase, // initial page title (old)
        listPage,     // target page title (new)
        { reason: "Migrate-fix pagename to iso 639-3", noredirect: true, movetalk: true });
    }catch(e){ console.error(e); }

I Checked my Special:BotPasswords/Dragons_Bot, where I did reset and update my login credential accordingly.

I didn't code for 2 months so maybe I missed an update. I tan npm update, but there is no outcome changes.

kanasimi commented 3 years ago

Well... It seems {Object} move_from_title and {Object} move_to_title was not allowed. I will fix this. Can you show the move_from_title and move_to_title?

console.trace([listPageBase,listPage])
hugolpz commented 3 years ago

12 shows a bypass. Remove from login URL the www.

I'am testing console.trace("1) ",[listPageBase,listPage]) together with login URL with www and without.

Login URL = 'https://www.lingualibre.org/api.php'

FAILS.

yug@yug-K401UB:~/Documents/DragonsBot$ node edit-Lingualibre-filename.js # 'https://www.lingualibre.org/api.php'
get_API_parameters: Cache wwwlingualibre: path=query+siteinfo
Code : Aym.
Base : ay.
List:Aym/Unilex_common_words_1 ***************************** */
Range: [00001-00200]
List:ay/Unilex_common_words_1 List:Aym/Unilex_common_words_1
Trace: 1)  [ 'List:ay/Unilex_common_words_1', 'List:Aym/Unilex_common_words_1' ]
    at /home/yug/Documents/DragonsBot/edit-Lingualibre-filename.js:80:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: missingparam: The "to" parameter must be set.
    at /home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/admin.js:166:15
    at check_session_badtoken (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:189:4)
    at XMLHttp_handler (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:655:4)
    at IncomingMessage.<anonymous> (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/Ajax.js:2242:6)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1224:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Trace: 2)  [ 'List:ay/Unilex_common_words_1', 'List:Aym/Unilex_common_words_1' ]
    at /home/yug/Documents/DragonsBot/edit-Lingualibre-filename.js:88:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Move page: Done.
Move talkpage: Done.
wiki_API_page: Not exists: [[User talk:Dragons Bot/Stop]]
The page to stop operation is not found ([[User talk:Dragons_Bot/Stop]]). The operation will continue as usual.
get_API_parameters: Cache wwwlingualibre: path=edit
wiki_API_query: 未登錄編輯?
/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:389
                throw new Error('wiki_API_query: 未登錄編輯?');
                ^

Error: wiki_API_query: 未登錄編輯?
    at wiki_API_query (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:389:11)
    at Timeout._onTimeout (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:335:5)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

Login URL = 'https://lingualibre.org/api.php'

works.

yug@yug-K401UB:~/Documents/DragonsBot$ node edit-Lingualibre-filename.js # 'https://lingualibre.org/api.php'
get_API_parameters: Cache lingualibreorg: path=query+siteinfo
Code : Aze.
Base : az.

List:Aze/Unilex_common_words_1 ***************************** */
Range: [00001-00200]
List:az/Unilex_common_words_1 List:Aze/Unilex_common_words_1
Trace: 1)  [ 'List:az/Unilex_common_words_1', 'List:Aze/Unilex_common_words_1' ]         <-------------- CONSOLE.TRACE() HERE

    at /home/yug/Documents/DragonsBot/edit-Lingualibre-filename.js:80:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Trace: 2)  [ 'List:az/Unilex_common_words_1', 'List:Aze/Unilex_common_words_1' ]
    at /home/yug/Documents/DragonsBot/edit-Lingualibre-filename.js:88:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Move page: Done.
Move talkpage: Done.
wiki_API_page: Not exists: [[User talk:Dragons Bot/Stop]]
The page to stop operation is not found ([[User talk:Dragons_Bot/Stop]]). The operation will continue as usual.
get_API_parameters: Cache lingualibreorg: path=edit
Edit category base: Done.
Category:Speakers_in_az Category:Speakers_in_aze
Move category: Done.

List:Aze/Unilex_common_words_2 ***************************** */
Range: [00201-01000]
List:az/Unilex_common_words_2 List:Aze/Unilex_common_words_2
Trace: 1)  [ 'List:az/Unilex_common_words_2', 'List:Aze/Unilex_common_words_2' ]
    at /home/yug/Documents/DragonsBot/edit-Lingualibre-filename.js:80:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Trace: 2)  [ 'List:az/Unilex_common_words_2', 'List:Aze/Unilex_common_words_2' ]
    at /home/yug/Documents/DragonsBot/edit-Lingualibre-filename.js:88:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Move page: Done.
Move talkpage: Done.
wiki_API_page: Not exists: [[:Category:Speakers in az]]
Edit category base: Done.
Category:Speakers_in_az Category:Speakers_in_aze
Error: articleexists: A page already exists at [[:Category:Speakers in aze]], or the page name you have chosen is not valid. Please choose another name.
    at /home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/admin.js:166:15
    at check_session_badtoken (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:189:4)
    at XMLHttp_handler (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/wiki/query.js:655:4)
    at IncomingMessage.<anonymous> (/home/yug/Documents/DragonsBot/node_modules/cejs/application/net/Ajax.js:2242:6)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1224:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Move category: Done.

ALSO

See there is a misspelling articleexists.

kanasimi commented 3 years ago

Please help me delete https://lingualibre.org/wiki/User:Kanashimi/test_move_to thank you