Talk:Citoid/2022
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Previous archives are at /Archive 1
Very high CPU usage
[edit]I'm running my small wiki on a VPS with 2 VCPU and 4GB ram. The zotero and citoid services are each using about 45% of total CPU. Meaning 95% of CPU is being utilised and it is slowing down the site. Any ideas? Is this expected behaviour and it just needs a very beefy server? InnerCitadel (talk) 03:08, 14 March 2022 (UTC)
- Are you running Chrome? Whatamidoing (WMF) (talk) 17:36, 14 March 2022 (UTC)
- It was starting and quitting repeatedly. Fixed now. InnerCitadel (talk) 19:05, 14 March 2022 (UTC)
- I'm glad to hear that it's working now. Feel free to come back if the problem reappears. Whatamidoing (WMF) (talk) 16:15, 15 March 2022 (UTC)
"but also may be accessible from the wikicode editing palette, if activated."
[edit]"but also may be accessible from the wikicode editing palette, if activated."
How? Are there steps/instructions on how to use Citoid without VisualEditor extension? I can't use VisualEditor because my shared hosting web provider does not allow "AllowEncodedSlashes NoDecode" because that directive cannot be set in .htaccess, and I do not have access to server config or virtualhost config as referenced in httpd.apache.org/docs/2.4/mod/core.html#allowencodedslashes Jasonkhanlar (talk) 23:15, 18 March 2022 (UTC)
- I know three approaches: “2017” source text editing toolbar (which is using VisualEditor internally), TemplateWizard available via source editing toolbar “2010”, and citoidWikitext@PerfektesChaos. PerfektesChaos (talk) 14:02, 20 March 2022 (UTC)
- @PerfektesChaos, I'm not sure what you mean with approaches (1) “2017” source text editing toolbar, and (2) TemplateWizard available via source editing toolbar “2010”. Could you elaborate further?
- There is yet another approach available: using Wikipedia's ProveIt gadget. Diegodlh (talk) 14:08, 4 May 2022 (UTC)
- There are a couple of user scripts that use citoid in the 2010 wikitext editor. @PerfektesChaos has written one. @Salix alba wrote w:en:User:Salix alba/Citoid. There are probably others. Whatamidoing (WMF) (talk) 05:44, 12 May 2022 (UTC)
Config.yaml
[edit]Where is config.yaml located? It's not in the citoid extension. InnerCitadel (talk) 06:01, 19 March 2022 (UTC)
- That portion is in the directions for installing the service, not the extension. Mvolz (WMF) (talk) 13:44, 23 March 2022 (UTC)
- It's in /opt/citoid/config.yaml InnerCitadel (talk) 22:38, 2 April 2022 (UTC)
Number of co-authors
[edit]When e.g. doi:10.1021/acs.est.1c04158 (14 co-authors) is cited using the Visual Editor, it only considers the first 11 (en.wikipedia) or 5 (de.wikipedia) co-authors. Where is the maximum number of co-authors defined? Leyo 14:42, 10 August 2022 (UTC)
- The number of authors is defined by the template data in each citation template being used. The parameters must exist, and then must also be added to the citoid map.
- For example, this is how you add more authors in en wiki to the cite journal template: https://en.wikipedia.org/w/index.php?title=Template:Cite_journal/doc&type=revision&diff=1103883139&oldid=1099054498&diffmode=source
- However, the en wiki citation templates only display authors up to 9, so those won't be displayed in the citation, and will only be present in the wikitext. Mvolz (WMF) (talk) 09:56, 11 August 2022 (UTC)
- Thank your for the explanation. When adding the citation above now (after your edit), all 14 authors are added to the source text. And they are all displayed, even though it says
If more than nine authors are defined, then only eight will show and 'et al.' will show in place of the remaining authors. - In de.wikipedia, de:Vorlage:Literatur/Doku contains TemplateData and a citoid map. However, I don't see where the number of authors is set as 5. As opposed to en.wikipedia, all authors are put into one parameter. Leyo 19:41, 12 August 2022 (UTC)
- That is odd - potentially a bug! Made a report here: task T315146 Mvolz (WMF) (talk) 11:29, 13 August 2022 (UTC)
- Unfortunately, the issue still exists, while the task did only get little attention. Leyo 17:26, 31 October 2022 (UTC)
feature enhancement to RefToolbar: www.youtube.com/watch: dateText
[edit]https://www.youtube.com/watch?v=QpiRWKRn1tE has ,"dateText":{"simpleText":"Jun 1, 2022"}}},
using source code editor citation template please parse for :
<ref>{{cite web ... |date=Jun 1, 2022}}</ref> .... 0mtwb9gd5wx (talk) 04:12, 30 August 2022 (UTC)
- Mvolz (WMF), this sounds like something for you to think about. Whatamidoing (WMF) (talk) 01:29, 1 October 2022 (UTC)
npm WARN tar ENOENT: no such file or directory
[edit]I tried installing both the translation-server and the zotero service from mediawiki via their git commands, and upon going in their respective directories, and trying to use npm install, they give me 100+ different versions of the same error:
npm WARN tar ENOENT: no such file or directory ...
For example one of the ones from translation-service:
npm WARN tar ENOENT: no such file or directory, lstat '/home2/wwiiarch/translation-server/node_modules/.staging/core-js-f5f4dd1d/modules'
The common thing that I have found for both of these is that when I go into each node_modules directory, it shows that they're emtpy. This is despite the fact that none of the isntructions tell me anything about this, and just say to use the git command. However it seems that I use the npm commands its looking for a .staging folder inside node_modules.
My version of node is v10.24.1 (before I was trying v12.22.12 but it doesn't seem to change anything), and my version of npm is 6.14.16
How do I fix this problem? Thanks Guillaume Taillefer (talk) 20:21, 30 October 2022 (UTC)
- Did you use the --recurse-submodules flag when you did git clone?
- If not you may be missing the submodules in your repo. If you do
git submodule init git submodule update npm install
- In your translation-server directory, hopefully that fixes it. Mvolz (WMF) (talk) 12:17, 1 November 2022 (UTC)
Did you use the --recurse-submodules flag when you did git clone?- Yes that's in the instructions to do for both translation-server and zotero.
- I tried both tried using the above commands in both translation-server/ and translation-server/node_modules.
- For translation-server/node_modules both the first two git commands resulted in no errors, I just typed them in, enter, and nothing. Then I do npm install, and it throws the hundreds of basically the same error again. In the middle of it it gave this error:
npm ERR! Error while executing:npm ERR! /usr/local/cpanel/3rdparty/lib/path-bin/git ls-remote -h -t ssh://git@github.com/zotero/wicked-good-xpath.gitnpm ERR!npm ERR! Permission denied (publickey).npm ERR! fatal: Could not read from remote repository.npm ERR!npm ERR! Please make sure you have the correct access rightsnpm ERR! and the repository exists.npm ERR!npm ERR! exited with error code: 128- And then it continued on and then eventually stopped with the error that the log could be found in debug logs. I then went to do it in just translation-server/. This did the exact same thing with the git commands, and when I did npm install, it did the same thing with the errors except it continually repeated the same looking error from my original comment, and then ended with this:
npm ERR! Error while executing:npm ERR! /usr/local/cpanel/3rdparty/lib/path-bin/git ls-remote -h -t ssh://git@github.com/zotero/wicked-good-xpath.gitnpm ERR!npm ERR! Warning: Permanently added the ECDSA host key for IP address '140.82.113.4' to the list of known hosts.npm ERR! Permission denied (publickey).npm ERR! fatal: Could not read from remote repository.npm ERR!npm ERR! Please make sure you have the correct access rightsnpm ERR! and the repository exists.npm ERR!npm ERR! exited with error code: 128npm ERR! A complete log of this run can be found in:npm ERR! /home2/wwiiarch/.npm/_logs/2022-11-01T22_04_08_734Z-debug.log- It seems to me that since I am on shared hosting this might have a thing to do with it. Thanks Guillaume Taillefer (talk) 22:14, 1 November 2022 (UTC)
- Ok so I have made some progress. First I deleted npm and node (as well as zotero), then redownloaded them with nvm (node v12.22.22). Then I retried downloading zotero, along with cd zotero, npm install. I got the deprecated errors again. One of those deprecated messages mentioned something about an outdated core-js. I then did npm install --save core-js. As far as I remember success for that. I then found out about npm outdated, which I then typed in (in zotero), and then I got the results of aws-sdk missing, along with md5, require, @zotero/eslint-config, etc. I then did npm install aws-sdk, which was mostly successful except for a few errors, which was taken care of using npm audit fix --force. I then fixed md5, require, @zotero/eslint-config, and some other ones, and it was pretty much up to date. I then did npm install, and finally it was successful! I then tried npm start, and there was a problem I have no idea how to solve:
> translation-server@2.0.4 start> node src/server.js/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/browser/parser/html.js:170after._pushedOnStackOfOpenElements?.();^SyntaxError: Unexpected token '.'at wrapSafe (internal/modules/cjs/loader.js:915:16)at Module._compile (internal/modules/cjs/loader.js:963:27)at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)at Module.load (internal/modules/cjs/loader.js:863:32)at Function.Module._load (internal/modules/cjs/loader.js:708:14)at Module.require (internal/modules/cjs/loader.js:887:19)at require (internal/modules/cjs/helpers.js:74:18)at Object.<anonymous> (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/browser/parser/index.js:4:20)at Module._compile (internal/modules/cjs/loader.js:999:30)at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)- This seems like this is all supposed to be there, so I didn't exactly want to modify the code; However I tried it once by deleting both the ? and . for both the shown variable and the one under, which showed no errors in the code. However when I run npm start again, it gave me a whole load of errors:
ReferenceError: FinalizationRegistry is not definedat new IterableWeakSet (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/living/helpers/iterable-weak-set.js:9:38)at new DocumentImpl (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:177:34)at Object.exports.setup (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/living/generated/Document.js:106:12)at Object.exports.create (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/living/generated/Document.js:47:18)at Object.exports.createImpl (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/living/generated/Document.js:51:27)at Object.exports.createImpl (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/living/documents.js:10:19)at Object.exports.createWrapper (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/living/documents.js:14:33)at new Window (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/browser/Window.js:236:30)at exports.createWindow (/home2/wwiiarch/zotero/node_modules/jsdom/lib/jsdom/browser/Window.js:96:10)at new JSDOM (/home2/wwiiarch/zotero/node_modules/jsdom/lib/api.js:36:20)- Anyone have the answer to this? Thanks Guillaume Taillefer (talk) 14:04, 9 November 2022 (UTC)
Error: Cannot find module 'w3c-xmlserializer/lib/XMLSerializer'
[edit]Since the last, post, I have managed to figure out most of the problems, but not all. I figured out that I needed to install many missing packages of which I could see were missing through npm outdated. I then downloaded all the missing packages, and then awaited to see if npm start would finally work, until it didn't. When I typed in npm start, it gave me this:
Error: Cannot find module 'w3c-xmlserializer/lib/XMLSerializer'
Require stack:
- /home2/wwiiarch/zotero/src/translation/translate.js
- /home2/wwiiarch/zotero/src/zotero.js
- /home2/wwiiarch/zotero/src/server.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/home2/wwiiarch/zotero/src/translation/translate.js:44:24)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home2/wwiiarch/zotero/src/translation/translate.js',
'/home2/wwiiarch/zotero/src/zotero.js',
'/home2/wwiiarch/zotero/src/server.js'
]
}
I tried npm install w3c-xmlserializer/lib/XMLSerializer but it gives me the following error:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home2/wwiiarch/zotero/w3c-xmlserializer/lib/XMLSerializer/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home2/wwiiarch/zotero/w3c-xmlserializer/lib/XMLSerializer/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home2/wwiiarch/.npm/_logs/2022-11-11T02_13_24_366Z-debug-0.log
I checked in the w3c-xmlserializer/lib/folder to see if there was a XMLSerializer, but there wasn't, just the .js files in there. I have no idea how to fix this so if anyone can that'd be great
My specs now are:
CentOS 6
shared hosting bluehost cpanel
node v16.18.1
npm 8.19.2
Thanks Guillaume Taillefer (talk) 02:15, 11 November 2022 (UTC)
UNABLE_TO_GET_ISSUER_CERT_LOCALLY
[edit]npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY npm ERR! request to https://registry.npmjs.org/has-flag failed, reason: unable to get local issuer certificate
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-11-14T14_10_54_259Z-debug.log Klymets (talk) 14:13, 14 November 2022 (UTC)
- You might want to ask a question at Project:Support desk. They will need a complete explanation. Whatamidoing (WMF) (talk) 02:38, 15 November 2022 (UTC)
PMC
[edit]When a journal article has a Pubmed ID, can autofill please check if it has a PMC free-fulltext ID, too? Pubmed metadata will say if there is a PMC ID. Having a PMC ID means that the reference has a fulltext link and is labelled with a little green unlocked padlock icon saying access is free, so it's really helpful to readers. It's even more helpful to remote medical professionals using Internet-in-a-box, as they have access to PMC fulltexts but not the internet.
It would also be nice to have autofill from a PMC ID or PMC URL work.
Thanks to everyone maintaining this tool! HLHJ (talk) 19:20, 20 November 2022 (UTC)
- This feature exists but unfortunately we've had performance issues with pubmed in the past so it doesn't always work.
- https://phabricator.wikimedia.org/T316835
- https://phabricator.wikimedia.org/T162886 Mvolz (WMF) (talk) 11:35, 22 November 2022 (UTC)