Last modified: 2014-10-24 11:51:36 UTC
Rewrite using Smarty 3 to get rid of compiled_templates folder that causes most of the installation issues. Use MediaWiki cache capabilities instead.
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.
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.
> 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.