Page MenuHomePhabricator

All pages have an error in the graphs section: unable to write file
Closed, ResolvedPublic

Description

Example: https://wikiapiary.com/wiki/Wikipedia_(en) > Error in widget Website graphs: unable to write file /srv/www/mediawiki/public_html/w/extensions/Widgets/compiled_templates/615be72446ca7907c72dccae6ba9574a3cb88f03_0.wiki.Website graphs.php Looks like a permission error

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 20 2018, 9:30 PM

I am unsure where you are seeing this, I'm not able to find this error on my end

Perhaps it is an on and off thing. I basically saw so this on every page embedding the widget. Now it is working.

Related: What I do when I install this extension is that I create a directory below /images/ called widgets and additionally set $wgWidgetsCompileDir = "$IP/images/widgets/";. Thus the file generation is moved out of the extension's folders where I believe it should not happen. This is obviously optional.

Hrmmm... I'm currently trying to get elasticsearch up and running but I will come back to this some other time.

@DeepBlue: Wikiapiary is down atm. You probably know, but pinging just in case.

asdhakdjhakdsjs Thanks for giving me the heads up, I had stopped work for the day

This comment was removed by DeepBlue.
DeepBlue added a comment.EditedJun 22 2018, 2:59 AM

Somehow the permissions for the cache directory got borked, that got fixed but its 504ing constantly now and we have a long-running process going so our hands are kinda tied for the moment. Tomorrow it should be done and service should be restored

@DeepBlue This issue continues to be around.

Paladox added a subscriber: Paladox.EditedJun 28 2018, 3:03 PM

You will probably want to add this:

# Ensure widgets template directory is read/writeable by webserver if mediawiki is cloned
file { '/srv/mediawiki/w/extensions/Widgets/compiled_templates':
    ensure  => directory,
    owner   => 'www-data',
    group   => 'www-data',
    mode    => '0755',
}

You will probably want to add this:

# Ensure widgets template directory is read/writeable by webserver if mediawiki is cloned
file { '/srv/mediawiki/w/extensions/Widgets/compiled_templates':
    ensure  => directory,
    owner   => 'www-data',
    group   => 'www-data',
    mode    => '0755',
}

I think it will be nice to get the directory for the templates out of the way of Git etc. like:

Perhaps it is an on and off thing. I basically saw so this on every page embedding the widget. Now it is working.
Related: What I do when I install this extension is that I create a directory below /images/ called widgets and additionally set $wgWidgetsCompileDir = "$IP/images/widgets/";. Thus the file generation is moved out of the extension's folders where I believe it should not happen. This is obviously optional.

Vvjjkkii renamed this task from All pages have an error in the graphs section: unable to write file to 1jaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Wesalius renamed this task from 1jaaaaaaaa to All pages have an error in the graphs section: unable to write file.Jul 1 2018, 10:31 AM
Wesalius updated the task description. (Show Details)
Wesalius added a subscriber: Aklapper.
Ciencia_Al_Poder raised the priority of this task from High to Needs Triage.Jul 2 2018, 4:51 PM

Currently I have my hands a bit full at the moment with other projects but if you could suggest a fix I would be glad to implement it.

Kghbln added a comment.EditedJul 10 2018, 4:31 PM

Currently I have my hands a bit full at the moment with other projects but if you could suggest a fix I would be glad to implement it.

What about my suggestion?

Or you could just do $wgWidgetsCompileDir = "$IP/images/"; and see what happens ...

Your first suggestion is flying a over my head but I'll see what I can do with your other one.

This issue has been resolved and the error no longer appears. What was required was to change the permissions on extensions/Widgets/compiled_templates

DeepBlue closed this task as Resolved.Jul 19 2018, 7:39 PM
DeepBlue claimed this task.