Topic on Project:Support desk

Jump to navigation Jump to search

How to create / styles.css file?

58
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

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.

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?

Reply to "How to create / styles.css file?"