Last modified: 2014-10-24 11:51:36 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 T20914, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18914 - Get rid of compiled_templates folder and use MW cache
Get rid of compiled_templates folder and use MW cache
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Widgets (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-25 17:18 UTC by Sergey Chernyshev
Modified: 2014-10-24 11:51 UTC (History)
5 users (show)

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


Attachments

Description Sergey Chernyshev 2009-05-25 17:18:40 UTC
Rewrite using Smarty 3 to get rid of compiled_templates folder that causes most of the installation issues.

Use MediaWiki cache capabilities instead.
Comment 1 Gregor Hagedorn 2011-11-11 11:28:25 UTC
I consider this a bug, not an enhancement because it breaks wiki farms.

Widgets requires Apache-write rights in a code-directory that is inside the shared code base. Many wikis all attempt to write into the same code folder here. 

The enhancement of reducing the update hassle would also be welcome, of course. With each minor version update, the rights to the folder have to be recreated (as a result of widgets being distributed as svn-tagged version, requiring to delete previous version before checking out the update).

Mediawiki has an explicitly directory for such purposes:

$wgCacheDirectory - Directory for caching data in the local filesystem.

- this works well on a wikifarm.
Comment 2 Sergey Chernyshev 2011-11-12 06:09:29 UTC
Can you try using "svn switch" and check if it breaks the permissions to the folder too?

I think until Smarty 3 rewrite will happen, pathing problem can be solved by introducing a new variable, e.g. $wgWidgetsCompiledTemplates which admins can set to "$wgCacheDirectory/widgets_compiled_templates" or something like that, making sure the folder is writable.

If variable is not set, extension will fall back to old method.

Simple change can be made to http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Widgets/WidgetRenderer.php?view=markup line 14 to use $wgWidgetsCompiledTemplates instead of default value if it is set.
Comment 3 Gregor Hagedorn 2011-11-12 09:06:24 UTC
> Can you try using "svn switch" 

thanks, I confirm this is a better method in this case. First time it matters, I have to admit I overlooked this.

> I think until Smarty 3 rewrite will happen, pathing problem can be solved by
> introducing a new variable, e.g. $wgWidgetsCompiledTemplates which admins can
> set to "$wgCacheDirectory/widgets_compiled_templates" or something like that,
> making sure the folder is writable.

I think the new variable does not necessarily needs to be set during installation (making it adjustable is a plus of course). $wgCacheDirectory is writable by webserver/php if it is used at all. Thus the folder can be easily created in the code. 
Fallback: if $wgCacheDirectory is false (default if no caching is used), then use $wgUploadDirectory, else fall back to present behavior.

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


Navigation
Links