Extension talk:Attachments

About this board

[ZLCIAcd34bA5sLYhVLolUAAAAIY] 2023-07-13 23:25:54: Fatal exception of type "Error"

1
Cesarhr (talkcontribs)

I have updated from Mediawiki 1.39 to 1.40 with Attachments 0.1.0


When I try to entry principal page of my mediawiki:


[ZLCI61ZAIcCo1FLSUnDLlAAAAQU] /index.php/Manual:NOM-035-STPS-2018:V1.0Alpha:Procedimiento_General_de_la_NOM-035-STPS-2018 Error: Call to undefined method MediaWiki\Page\PageProps::getInstance()

Backtrace:

from /home/wwuni2/uni2porti.org/extensions/Attachments/includes/Attachments.php(73)

#0 /home/wwuni2/uni2porti.org/extensions/Attachments/includes/AttachmentsHooks.php(62): Attachments::getPages(MediaWiki\Title\Title)

#1 /home/wwuni2/uni2porti.org/includes/HookContainer/HookContainer.php(338): AttachmentsHooks::onBeforePageDisplay(OutputPage, MediaWiki\Skins\Vector\SkinVector22)

#2 /home/wwuni2/uni2porti.org/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

#3 /home/wwuni2/uni2porti.org/includes/HookContainer/HookRunner.php(941): MediaWiki\HookContainer\HookContainer->run(string, array, array)

#4 /home/wwuni2/uni2porti.org/includes/OutputPage.php(2894): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay(OutputPage, MediaWiki\Skins\Vector\SkinVector22)

#5 /home/wwuni2/uni2porti.org/includes/MediaWiki.php(941): OutputPage->output(boolean)

#6 /home/wwuni2/uni2porti.org/includes/MediaWiki.php(576): MediaWiki->main()

#7 /home/wwuni2/uni2porti.org/index.php(50): MediaWiki->run()

#8 /home/wwuni2/uni2porti.org/index.php(46): wfIndexMain()

#9 {main}


What can I do?

Reply to "[ZLCIAcd34bA5sLYhVLolUAAAAIY] 2023-07-13 23:25:54: Fatal exception of type "Error""
Dmitry Karev (talkcontribs)

Hi, thank you for really useful extension.

If you like to add Russian translation into your package, I'll be glad to share. Write me directly.

Reply to "Translation"

Have the 'Attachments' tab at the top as a seperate page

3
MavropaliasG (talkcontribs)

Hi, will this allow me to have attachments in specific pages, instead of the "Main" namespace?


Also, would it be possible (or is it planned) to have that 'attachments' tab at the top as a seperate section of a page, similar to how the 'Discussion' button takes you a new page of an article?


Moreover, are the files going to be displayed as they are now, or they could be more organised using a file browser (similar to this extension )? (or by maybe using this? Extension:FileList )

Essentially I want to have each page have a 'files' tab that will act like a file repository with a file browser, with write access only for the creator of the page.


Thank you.

Gittenburg (talkcontribs)

Hi!

The attachments are attached to specific pages. You can enable the extension on a namespace by namespace basis.

  • This extension was designed for having attachments your users care about (hence they are displayed on the same page).
  • The extension was also designed for having many attachments on one page (hence the compact column layout).
  • The extension displays files, subpages and links together in the same list, sorted alphabetically.

Restricting access to the creator will not be implemented because MediaWiki also does not support it as it goes against the collaborative nature of a wiki.

This extension unfortunately does not cover your use case, I'll update the introduction to make the intended use case more clear.

You could try:

  • the Extension:VisualEditor which allows easily embedding files with "Insert -> Media"
  • MoinMoin Wiki, which supports attachments out of the box and displays them in a separate page

Good luck!

MavropaliasG (talkcontribs)

Thank you very much! And thank you for making the extension :)

Reply to "Have the 'Attachments' tab at the top as a seperate page"

go back to parent page

3
IBikette (talkcontribs)

I found this very usefull, thank you !


but...

*when I use {{FILEPREFIX:..}} a "-" is added at the end and leave the link unavailable.

*And how can I remove an attachment I create by error ?

IBikette (talkcontribs)

OK... when it's a media file, simply remove {{#attach... in the Description section of the file


Gittenburg (talkcontribs)

The "-" that is added by {{FILEPREFIX}}, should also be added automatically when uploading a file via the Attach page action.

{{FILEPREFIX:..}} would for example be used on Foo/Bar, to embed a file you previously attached to Foo.

Reply to "go back to parent page"
Postprefix (talkcontribs)

I see that "It is recommended to set up a job runner". What job should be run?

Gittenburg (talkcontribs)

Setting up a job runner should only be necessary if you add the parser functions of this extension using the API repeatedly and your wiki has few traffic. I guess I should update the README.

Postprefix (talkcontribs)

I understand. I'm not sure it'll apply in my case, but thank you for explaining!

Postprefix (talkcontribs)

Just happened to be looking for something like this. Thanks!

Gittenburg (talkcontribs)

Happy to hear that, I'm glad somebody else finds it useful.

Reply to "Thanks for this!"
There are no older topics
Return to "Attachments" page.