Last modified: 2007-10-16 13:59:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13238, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11238 - SMW blocked when Extension:Pdf Export is loaded.
SMW blocked when Extension:Pdf Export is loaded.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All Linux
: Low blocker with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://krefeldwiki.de/
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-08 16:47 UTC by Purodha Blissenbach
Modified: 2007-10-16 13:59 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Purodha Blissenbach 2007-09-08 16:47:04 UTC
This is probably an informative message only,
since it is possibly not Semantic MediaWikis
fault, see
http://www.mediawiki.org/wiki/Extension_talk:Pdf_Export#Bug:_Pdf_Export_blocks_SemanticMediaWiki

When the Pdf Export Extension was included
in Localsettings.php before SMW, we observed:

* Special:Version  looked as expected.
* Special:Specialpages  did not show any of SMWs special pages
* URL-calling the page Special:SMWAdmin, or entering it via
  the seach box, yielded a "nonexisting special page" error

Removing the line:
  require_once($IP.'/extensions/PdfExport/PdfExport.php');

from Localsettings.php made SMW work.

Putting it *after* the inclusion of SMW at least
passed a quick test of SMW.

The Pdf Export extensions code can be found at
http://www.mediawiki.org/wiki/Extension:Pdf_Export
Comment 1 Markus Krötzsch 2007-10-02 10:21:34 UTC
This is a semi-bug in the PDF extension: it adds a special page object during init, thereby triggering MediaWiki's complete init procedure for all special pages. SMW, in contrast, merely registers its special pages for later on-demand loading. Now when using PDFExport, the "later" loading has already happened, without SMW's pages being considered.

A fix, which will also significantly speed up wikis that use PDFExport, is as follows:

* move the class definition for SpecialPdf out of the function wfSpecialPdf()
* remove the line SpecialPage::addPage (new SpecialPdf()); from wfSpecialPdf()
* add the following code to wfSpecialPdf():

 global $wgSpecialPages; 
 $wgSpecialPages['PdfPrint'] = array('SpecialPdf');
Comment 2 Markus Krötzsch 2007-10-03 18:09:58 UTC
Thinking about it, the values for $wgSpecialPages should be set up right away during loading, not in the extension hook. I will move SMW's registrations, so that even the current PdfPrint version should not break them. The above change is still useful to improve performance (the impact of addPage can be quite large), but again it should be better to move 

$wgSpecialPages['PdfPrint'] = array('SpecialPdf');

right at to top, outside of the function.
Comment 3 Purodha Blissenbach 2007-10-16 13:59:43 UTC
Added to the page http://www.mediawiki.org/wiki/Extension:Pdf_Export

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links