Topic on Project:Support desk

How to create / styles.css file?

83
Tofiq Kərimli (talkcontribs)

Hello I'm new. All my work is in order (https://wiki.sheki.site/) . I only have 2 problems; One of these is that I can not create some files. For example, Module: Citation / CS1 / styles.css has no content How do I create this? The document contains errors. Written: "Are you sure you want to save?" Then it is written: Error: Lua error at line 1: unexpected symbol near '/'. What do I have to do? Thanks in advance.

AhmadF.Cheema (talkcontribs)
Tofiq Kərimli (talkcontribs)

Needed for Template:Citation. I can not create sub template for several other templates.

MarkAHershberger (talkcontribs)

Where do you see the Lua error?

Tofiq Kərimli (talkcontribs)

When I click the "Save changes" button, this warning is displayed: "Are you sure you want to save?" Second time this warning is displayed:Error: Lua error at line 1: unexpected symbol near '/'.

MarkAHershberger (talkcontribs)

I assume you're trying to copy something like this page.

A non-existent page in the Modules namespace that ends with .css is identified as a CSS page. The same page without .css is identified as scribunto or lua. On your wiki, both are identified as scribunto.

This is handled by TemplateStyles and integration of TemplateStyles with Scribunto is only available since 1.33.

You can try installing the newer Scribunto and TemplateStyles in your current wiki, but it looks like you really need to upgrade the wiki.

Tofiq Kərimli (talkcontribs)
Tofiq Kərimli (talkcontribs)

About my Wiki:

MediaWiki 1.32.1
PHP 7.0.33 (cgi-fcgi)
MySQL 5.7.26
ICU 4.2.1
Lua 5.1.5

Do you need any further information?

TheDJ (talkcontribs)

Have you installed Extension:TemplateStyles ? a requirement for many modern complex templates copied from English Wikipedia.

MarkAHershberger (talkcontribs)

I just discovered that extension (see my most recent comment above). Could they install just that extension and designate the Module namespace and have it work?

Tofiq Kərimli (talkcontribs)

I downloaded "Scribunto REL1-33". Everything remained the same. I wanted to change the module here:

https://wiki.sheki.site/index.php?title=X%C3%BCsusi:ChangeContentModel/Module:Citation/CS1/s.css . It turned out:

[XShOPbuOMIRDVkC8476ujAAAAAQ] /index.php?title=X%C3%BCsusi:ChangeContentModel/Module:Citation/CS1/s.css Error from line 76 of /home/ipekchi/public_html/wiki/extensions/TemplateStyles/includes/TemplateStylesContent.php: Class 'Wikimedia\CSS\Parser\Parser' not found

Backtrace:

#0 /home/ipekchi/public_html/wiki/extensions/TemplateStyles/includes/TemplateStylesContent.php(131): TemplateStylesContent->sanitize(array)

#1 /home/ipekchi/public_html/wiki/includes/Revision/RenderedRevision.php(242): TemplateStylesContent->getParserOutput(Title, NULL, ParserOptions, boolean)

#2 /home/ipekchi/public_html/wiki/includes/Revision/RenderedRevision.php(211): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(TemplateStylesContent, boolean)

#3 /home/ipekchi/public_html/wiki/includes/Revision/RevisionRenderer.php(175): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)

-//-

#23 /home/ipekchi/public_html/wiki/index.php(42): MediaWiki->run()

#24 {main}


I downloaded "TemplateStyles REL1-33". When I try to create Module:Citation/CS1/styles.css , it emerges: [XShLfpbzS52E3RAPefNzSgAAAAA] /index.php?title=Module:Citation/CS1/styles.css&action=submit Error from line 78 of /home/ipekchi/public_html/wiki/extensions/TemplateStyles/includes/TemplateStylesContent.php: Class 'Wikimedia\CSS\Parser\Parser' not found

Backtrace:

#0 /home/ipekchi/public_html/wiki/extensions/TemplateStyles/includes/TemplateStylesContent.php(135): TemplateStylesContent->sanitize(array)

#1 /home/ipekchi/public_html/wiki/includes/Revision/RenderedRevision.php(242): TemplateStylesContent->getParserOutput(Title, NULL, ParserOptions, boolean)

#2 /home/ipekchi/public_html/wiki/includes/Revision/RenderedRevision.php(211): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(TemplateStylesContent, boolean)

-//-

#23 /home/ipekchi/public_html/wiki/index.php(42): MediaWiki->run()

#24 {main}

AhmadF.Cheema (talkcontribs)

I don't think you can install "Scribunto REL1-33" with MediaWiki v1.32 release. You'll have to upgrade your MediaWiki to v1.33 to make use of Scribunto REL1_33.

Tofiq Kərimli (talkcontribs)
MarkAHershberger (talkcontribs)

You will need TemplateStyles in addition to the newer Scribunto.

If you just want to upgrade, you can get the update on the download page.

Tofiq Kərimli (talkcontribs)
MarkAHershberger (talkcontribs)

I see. Then you should just upgrade to the latest version of MediaWiki.

Tofiq Kərimli (talkcontribs)

I did that:

MediaWiki 1.33.0
PHP 7.0.33 (cgi-fcgi)
MySQL 5.7.26
ICU 4.2.1
Lua 5.1.5

Nothing has changed. Everything remains the same. Additionally, the following errors appear on all pages: [XSjUIF7nhIiVEDQYFJvOCAAAAAo] /index.php?title=Ana_S%C9%99hif%C9%99&action=edit Error from line 36 of /home/ipekchi/public_html/wiki/extensions/WikiEditor/includes/WikiEditorHooks.php: Call to undefined method EventLogging::sessionInSample()

Backtrace:

#0 /home/ipekchi/public_html/wiki/extensions/WikiEditor/includes/WikiEditorHooks.php(114): WikiEditorHooks::doEventLogging(string, Article, array)

#1 /home/ipekchi/public_html/wiki/includes/Hooks.php(174): WikiEditorHooks::editPageShowEditFormInitial(EditPage, OutputPage)

#2 /home/ipekchi/public_html/wiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#3 /home/ipekchi/public_html/wiki/includes/EditPage.php(2770): Hooks::run(string, array)

#4 /home/ipekchi/public_html/wiki/includes/EditPage.php(712): EditPage->showEditForm()

#5 /home/ipekchi/public_html/wiki/includes/actions/EditAction.php(60): EditPage->edit()

#6 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(499): EditAction->show()

#7 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)

#8 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(865): MediaWiki->performRequest()

#9 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(515): MediaWiki->main()

#10 /home/ipekchi/public_html/wiki/index.php(42): MediaWiki->run()

#11 {main}

MarkAHershberger (talkcontribs)

When you upgrade your wiki, you generally need to upgrade all the extensions, as well. Try upgrading WikiEditor and the EventLogging extension.

Tofiq Kərimli (talkcontribs)

Other errors have been corrected. Only "Home Page" is completely lost.

The Module: Citation / CS1 / styles.css has not been created yet. It shows this error:

[XSkAusGSMffooJ-SDnAP@gAAAAM] /index.php?title=X%C3%BCsusi:ChangeContentModel/ Error from line 78 of /home/ipekchi/public_html/wiki/extensions/TemplateStyles/includes/TemplateStylesContent.php: Class 'Wikimedia\CSS\Parser\Parser' not found

Backtrace:

#0 /home/ipekchi/public_html/wiki/extensions/TemplateStyles/includes/TemplateStylesContent.php(135): TemplateStylesContent->sanitize(array)

#1 /home/ipekchi/public_html/wiki/includes/Revision/RenderedRevision.php(265): TemplateStylesContent->getParserOutput(Title, NULL, ParserOptions, boolean)

#2 /home/ipekchi/public_html/wiki/includes/Revision/RenderedRevision.php(234): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(TemplateStylesContent, boolean)

#3 /home/ipekchi/public_html/wiki/includes/Revision/RevisionRenderer.php(193): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)

#4 /home/ipekchi/public_html/wiki/includes/Revision/RevisionRenderer.php(142): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)

-//-

#21 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(865): MediaWiki->performRequest()

#22 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(515): MediaWiki->main()

#23 /home/ipekchi/public_html/wiki/index.php(42): MediaWiki->run()

#24 {main}

MarkAHershberger (talkcontribs)
Tofiq Kərimli (talkcontribs)
MarkAHershberger (talkcontribs)

I don't think you should use the Special:ChangeContentModel page to change the content type. Just let Scribunto and TemplateStyles do their thing. Can you revert your changes?

Tofiq Kərimli (talkcontribs)

Unfortunately, I do not know how to get back. But it seems to me that it's the same as before. Both pages have been deleted.

Tofiq Kərimli (talkcontribs)

I've updated all the extensions. But "Module: Citation / CS1 / styles.css" did not appear. Moreover, "MediaWiki 1.33" works very slowly. does not open "commons.wikimedia" files.

MarkAHershberger (talkcontribs)

Could you re-install with 1.33 so we can see what info on Module:Citation/CS1/styles.css shows?

I'm not sure what you mean by 'does not open "commons.wikimedia" files' but that sounds like a bug that we should find more information about.

Tofiq Kərimli (talkcontribs)

True, the problem of "commons.wikimedia" files probably appeared for another reason. Because I have resumed the MediaWiki version 1.33, the problem remains: https://wiki.sheki.site/index.php?title=X%C3%BCsusi:WantedFiles I do not know why, maybe some extensions have changed. For example, because I downloaded "Scribunto REL1_33" instead of "Scribunto REL1_32". I think that if I return them to the previous situation, it will probably be the same as before.

MarkAHershberger (talkcontribs)

It shows that you still have 1.32 extensions installed instead of 1.33 ones. Let me know when/if you get that straightened out.

Tofiq Kərimli (talkcontribs)

I understand that nobody knows how to solve the problem. Therefore, there is no answer to my question.

Tofiq Kərimli (talkcontribs)
Tofiq Kərimli (talkcontribs)

I resumed version 1-32.1 with "http://wiki.sheki.site/mw-config/". Expansions remain in the "1-33" version. There is no problem. Now there is no problem with "commons.wikimedia".

Tofiq Kərimli (talkcontribs)

I downloaded "MediaWiki 1.33.0" again.

Məhsul Versiya
MediaWiki 1.33.0
PHP 7.0.33 (cgi-fcgi)
MySQL 5.7.26
ICU 4.2.1
Lua 5.1.5

All the extensions were originally "1.33". I wrote this above. No pages can be edited. When I wanted to edit the pages, but the following errors appeared on all pages:


[XSrnNnnkxR@u@UeB5zGZgQAAAAU] /index.php?title=Dinar&action=edit Error from line 36 of /home/ipekchi/public_html/wiki/extensions/WikiEditor/includes/WikiEditorHooks.php: Call to undefined method EventLogging::sessionInSample()

Backtrace:

#0 /home/ipekchi/public_html/wiki/extensions/WikiEditor/includes/WikiEditorHooks.php(114): WikiEditorHooks::doEventLogging(string, Article, array)

#1 /home/ipekchi/public_html/wiki/includes/Hooks.php(174): WikiEditorHooks::editPageShowEditFormInitial(EditPage, OutputPage)

#2 /home/ipekchi/public_html/wiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#3 /home/ipekchi/public_html/wiki/includes/EditPage.php(2770): Hooks::run(string, array)

#4 /home/ipekchi/public_html/wiki/includes/EditPage.php(712): EditPage->showEditForm()

#5 /home/ipekchi/public_html/wiki/includes/actions/EditAction.php(60): EditPage->edit()

#6 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(499): EditAction->show()

#7 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)

#8 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(865): MediaWiki->performRequest()

#9 /home/ipekchi/public_html/wiki/includes/MediaWiki.php(515): MediaWiki->main()

#10 /home/ipekchi/public_html/wiki/index.php(42): MediaWiki->run()

#11 {main}


Does not open "commons.wikimedia" files. Should we go back or solve this problem?

AhmadF.Cheema (talkcontribs)

Usually, your MediaWiki core and extensions have to be correspond to the same release.

Take a look at the error description. It mentions "extensions/WikiEditor" and a call to an undefined method. This usually means that the release versions of your WikiEditor extension and MediaWiki core do not match.

Make sure your Extension:WikiEditor is the right version.

Tofiq Kərimli (talkcontribs)
Tofiq Kərimli (talkcontribs)

Now I'll check it again. I'm paying attention to the fact that when the name "EventLogging" is removed from the "LocalSettings.php" page, the errors disappear.

Tofiq Kərimli (talkcontribs)
This post was hidden by 94rain (history)
AhmadF.Cheema (talkcontribs)
Tofiq Kərimli (talkcontribs)

No, I checked them all, and sometimes I downloaded it several times. I uploaded a new one here ( расширение: EventLogging, - mediawiki-extensions-EventLogging-REL1_33 ) . Look, the history of both of them is the same.

AhmadF.Cheema (talkcontribs)
Tofiq Kərimli (talkcontribs)
Tofiq Kərimli (talkcontribs)
Tofiq Kərimli (talkcontribs)

I've created a new Wiki.

Məhsul Versiya
MediaWiki 1.33.0
PHP 7.0.33 (cgi-fcgi)
MySQL 5.7.26
ICU 4.2.1
Lua 5.1.5


Extensions are those contained in it. I have just downloaded "Scribunto-REL1_33" and TemplateStyles-REL1_33. But it is not possible to create "Module: Citation / CS1 / styles.css". Here Anomie pointed out the solution to the problem: "You probably forgot to run composer update --no-dev as described at Extension:TemplateStyles#Installation?" But the "composer update" file does not exist here and I do not know what to do? AhmadF.Cheema and MarkAHershberger, I would be very happy if you told me that.

MarkAHershberger (talkcontribs)

Re: composer. There is no "composer update" file. That would be a command you run.

Do you have shell access? If not, fulfilling the dependencies is going to be a problem.

AhmadF.Cheema (talkcontribs)
Tofiq Kərimli (talkcontribs)

No, I think there is no difference. These files (Scribunto: .eslintrc.json; .gitignore; .minus-x.json; .gitreview; .phpcs.xml; .stylelintrc.json and TemplateStyles: .eslintrc.json; .gitignore; .gitreview; .phpcs.xml ) do not appear there, but appear in "ftp"... The cause of the problem is known. Here Anomie pointed out the solution to the problem: "You probably forgot to run composer update --no-dev as described at Extension:TemplateStyles#Installation?" But the "composer update" file does not exist here and I do not know what to do? I would be very happy if you told me that.

Tofiq Kərimli (talkcontribs)

When I try to create a "Module: Citation / CS1 / styles.css, the following error appears:"


[XS4dotTx@UPJx-C1o@Y-CAAAAA4] /index.php?title=Module:Citation/CS1/styles.css&action=submit Error from line 78 of /home/ipekchi/public_html/sheki.site/extensions/TemplateStyles/includes/TemplateStylesContent.php: Class 'Wikimedia\CSS\Parser\Parser' not found

Backtrace:

#0 /home/ipekchi/public_html/sheki.site/extensions/TemplateStyles/includes/TemplateStylesContent.php(135): TemplateStylesContent->sanitize(array)

#1 /home/ipekchi/public_html/sheki.site/includes/Revision/RenderedRevision.php(265): TemplateStylesContent->getParserOutput(Title, NULL, ParserOptions, boolean)

#2 /home/ipekchi/public_html/sheki.site/includes/Revision/RenderedRevision.php(234): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(TemplateStylesContent, boolean)

--//--

#26 /home/ipekchi/public_html/sheki.site/index.php(42): MediaWiki->run()

#27 {main}

MarkAHershberger (talkcontribs)

We're getting somewhere. At least the right content handler is being used.

MarkAHershberger (talkcontribs)

You do need to take care of the composer dependencies. The error is because the composer dependency for TemplateStyles isn't fulfilled. Do you have command line access to the server?

Tofiq Kərimli (talkcontribs)

Thank you for your attention. I have command line access to the server. I learned a lot in a month. Only I can not learn this: take care of the composer dependencies

MarkAHershberger (talkcontribs)

You need to download composer.phar and then rename composer.local.json-sample to composer.local.json. In compose.local.json, replace extensions/example/composer.json with extensions/TemplateStyles/composer.json and then run this command: php composer.phar update --no-dev. That should install the dependencies you need. Once you've run that command, could you paste the output here so we can help if you run into problems later.

Tofiq Kərimli (talkcontribs)

MarkAHershberger, thank you very much. No such clear explanation elsewhere. I easily understood what you wrote. But I did not understand two things:

1. I need to download composer.phar. Where to download; on "extensions / TemplateStyles"? Or inside the root MediaWiki directory?

2. Only one thing I did not understand: "run this command: php composer.phar update --no-dev" . So, do I need to write it in "composer.local.json"? I wrote so:

{

"extra": {

"merge-plugin": {

"include": [

"extensions/TemplateStyles/composer.json"

]

}

},

        "php composer.phar update": "no-dev"

}

MarkAHershberger (talkcontribs)

> I need to download composer.phar. Where to download?

The instructions to download composer.phar are on the linked page above. This is the gecomposer.org/download page. It does not mentione composer.phar directly, but that is the file produced by the command php composer-setup.php.

The commands on the download page are currently:

  1. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  2. php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  3. php composer-setup.php
  4. php -r "unlink('composer-setup.php');"

Note that hash in #2 may change by the time you read this, so you need to copy the commands directly from the getcomposer.org/download page. These commands need to be run using your shell access on the command line.

Run these command to download composer.phar inside the your root MediaWiki directory.

You said you have shell access, so you can run these commands at the command prompt after you log in.

Tofiq Kərimli (talkcontribs)

Thank you.

1.Yesterday I downloaded composer.phar to the root MediaWiki directory.

2. Then I renamed composer.local.json-sample to composer.local.json.

3. In compose.local.json, I replaced extensions / example / composer.json with extensions / TemplateStyles / composer.json.

4. ? Then I need to run this command: php composer.phar update --no-dev ? I can not do that. Because I can not understand. What is "--no-dev"? I can not do that. Because I can not understand. What is "--no-dev"? In compose.local.json? So: {

"extra": {

"merge-plugin": {

"include": [

"extensions/TemplateStyles/composer.json"

]

}

},

        "php composer.phar update": "no-dev"

}?

AhmadF.Cheema (talkcontribs)

When the instruction is to run a command, it doesn't mean that you need to edit some file. You have to run that command through some terminal (like cmd, PuTTY etc.).

For running such commands, you'll first need to connect to your computer through SSH to your website's host server. Your hosting service should have instructions on exactly how to do this.

As a beginner, see How does SSH Work (only up to the second section How Does SSH Work, the rest is mostly unnecessary).

Tofiq Kərimli (talkcontribs)
AhmadF.Cheema (talkcontribs)

Why do you think you need to transfer your account to VPS? This has nothing to do with what has been mentioned previously.

Which hosting service and host plan are you using?

Tofiq Kərimli (talkcontribs)
MarkAHershberger (talkcontribs)

Use the SSH access one.

Tofiq Kərimli (talkcontribs)

MarkAHershberger, this video shows that (0:17) should have the "SSH / Shel Access" button. But I do not have such a button. I downloaded "PuTTY". But, unfortunately, I could not activate it. Maybe if I get another host, will this problem be solved?

MarkAHershberger (talkcontribs)

Make sure that your host provides shell access. You can get a VPS pretty cheaply from Linode (for example) if that helps.

Tofiq Kərimli (talkcontribs)

I had such a mistake. It seems that this problem can be solved.

MarkAHershberger (talkcontribs)

Hurrah! Was it a firewall issue?

I'm glad you managed to resolve the issues here even if it did take us all more than a week.

Tofiq Kərimli (talkcontribs)

MarkAHershberger,Thanks for the help. I learned something. I read a lot and asked a lot of questions. But, unfortunately, there was no result. This is a very difficult job. I could not do that.

MarkAHershberger (talkcontribs)

I'm sorry to hear that. But are you able to use Putty to access your site?

Tofiq Kərimli (talkcontribs)

I could not do that. Posted: PuTTY fatal error There are so many videos that I've looked up, and there is no help. It was very important to me. Unfortunately, all my attempts were unsuccessful. But there is still a way, the last way. One of you can download the Wikibase and Template Style for me. I can give him a password. If anyone agrees, I'll be glad. And I thank him in advance. This is the last way for me.

AhmadF.Cheema (talkcontribs)

Can't give any guarantees, but can try. You can send me the credentials through email.

Tofiq Kərimli (talkcontribs)

Thanks. I sent.

Tofiq Kərimli (talkcontribs)
Tofiq Kərimli (talkcontribs)

Within a month, I expect someone to answer my question. But no one answers. But I hope that the answer will be soon. I look forward to this minute.

MarkAHershberger (talkcontribs)

Calm down.

It hasn't even been a day, let alone a month. Those of us who post here do so in our free time. Sometimes other things in life have our attention so we are not able to respond quickly.

AhmadF.Cheema (talkcontribs)

Even with the hidden items, the numbers don't match.

This is Scribunto's REL1_33/extension.json file on GitHub (the same one obtained through extension distributor) and this is on your server. Both are obviously different (check the "manifest_version" at the end).

Stop assuming things, there is no "composer update" file. Once more, it doesn't appear that you have the correct version copied on your server.

Tofiq Kərimli (talkcontribs)

Thank you for your attention. I downloaded: Scribunto-REL1_33-8328acb.tar.gz and TemplateStyles-REL1_33-c76fd84.tar.gz . And I activated them. What should I do next? Thank you in advance of your reply.

MarkAHershberger (talkcontribs)

Just fyi, master has manifest_version 2 and, until a few hours ago, the extension distributor didn't have 1.33 as a stable version. Maybe he has the master version.

Tofiq Kərimli (talkcontribs)

Yes, I downloaded the "master" version yesterday. Previously, the version was "REL1_33". Do you think I should download the version of "REL1_33" again?

MarkAHershberger (talkcontribs)

It wouldn't hurt, but may not be necessary.

AhmadF.Cheema (talkcontribs)
Tofiq Kərimli (talkcontribs)

AhmadF.Cheema, thank you very much. But I want to know, do you expect me to answer this question? Or should another person respond?

AhmadF.Cheema (talkcontribs)

someone else

Tofiq Kərimli (talkcontribs)

Finally, I was able to create the "Module: Citation / CS1 / styles.css" file. Without the use of PuTTY. How?

1. I added the "Vendor" folder to the TemplateStyles folder.

2. I deleted 4 lines starting with "background: URL (// upload.wikimedia.org/wikipedia/commons/thumb/" on the "Module: Citation / CS1 / styles.css" page. The fourth character in each of them was an error.

I am grateful to everyone, especially, @AhmadF.Cheema for their help.