Topic on Extension talk:PDFEmbed

Jump to navigation Jump to search

Users unable to embed PDF

12
Legaulph (talkcontribs)
MediaWiki 1.25.5

When trying to embed a PDF the user is getting:

"you don't have permission to embed pdf files"

If I edit as admin and save it I get the same error.

I have to delete it save then edit and add the link and save then it is successful

Pisnaz (talkcontribs)

Are you using <pdf>File:FooBar.pdf</pdf> ?

I just had the same issue and am kicking myself for it now.

165.228.93.174 (talkcontribs)

Having the same issue as well any ideas

Pisnaz (talkcontribs)

Seems I had other issues as well once I started using my bot and normal users.

There is a embed_pdf permission showing now, that I did not see before. It seems it is only on Administrators by default.

For my Bot uploads I simply added in $wgGroupPermissions['bot']['embed_pdf'] = true; to my LocalSettings.php

I am running:

MediaWiki 1.26.2
PDFEmbed 1.1.2

Hope that helps. Also be careful as blanket permissions might cause issues.

RockSheep (talkcontribs)

This should be said in the configuration section of the extension article. Thanks!

Legaulph (talkcontribs)

Yes that works for me as well

This post was hidden by Pisnaz (history)
209.159.235.12 (talkcontribs)

That worked great! now that that has a permission line I can get my users to see or embed. Thanks a bunch!

77.20.30.72 (talkcontribs)

Hello,

I have added the

$wgGroupPermissions['*']['embed_pdf'] = true;

to my LocalSettings.php but I still get the error-message "you don't have permission to embed pdf files". MW Version 1.31.1

What else can I check?

Thanks in advance!

217.19.146.36 (talkcontribs)

Anyone on this problem ?

IMTS-TB (talkcontribs)

Hi,


I've installed the Extionsion, and can upload PDF files to our MediaWiki 1.31.

However, after linking to the uploaded file, and saving the page, a empty square shows, where the PDF image should be.

When I check the source code of the page, an URL is listed, and when I click on the URL, the PDF is opened.

All this happens in Google Chrome.


I also installed this extension in our TestWiki, and there I have no issues! Same browser., same Wiki version

212.236.21.221 (talkcontribs)

Hi

You have to replace line 92 in the PDFEmbed.hooks.pdf file

OLD

'src' => $file->getFullUrl().'#page='.$page,

NEW

'src' => preg_replace("/^http:/i", "https:", $file->getFullUrl()).'#page='.$page,


When not changed, you get an empty square, cause your side is loaded with https and the extension uses http, mixed content, blocked in chrome for example.

Reply to "Users unable to embed PDF"