The deploy tools we use typically exclude files like README.txt, COPYRIGHT.txt and the likes during a deploy to a production environment. This causes problem as the help page for Strongarm reads the contents from README.txt and we end up with errors like this:

Warning: file_get_contents(sites/all/modules/contrib/strongarm/README.txt): failed to open stream: No such file or directory i strongarm_help() (row 75 /***/sites/all/modules/contrib/strongarm/strongarm.module).

Perhaps the contents could be read from another file or put directly in the .php-file?

Comments

justinstandring’s picture

Status: Active » Needs review
StatusFileSize
new2.19 KB

I agree - we have a deploy script that strips README.txt files out of production site builds so there ends up being a few stray warnings.

In this patch, I've copied some text from the Strongarm project page as an alternative when the README file doesn't exist. I've also added some 'Useful Links' although this does run the risk of broken links in the future.

izmeez’s picture

Status: Needs review » Needs work

Encountering a similar problem because the README.txt file permissions are restricted to 600.
Patch in #1 does not work because file does exist but permission is denied.
Otherwise this approach seems better than module using the README.txt file for help.

izmeez’s picture

Changing the line in patch from
if (file_exists($readme)) {
to
if (is_readable($readme)) {
will both confirm if files exists and if is readable satisfying either condition.

izmeez’s picture

Status: Needs work » Needs review
StatusFileSize
new2.19 KB

I am uploading a revised patch with the change in comment #3

justinstandring’s picture

Status: Needs review » Reviewed & tested by the community

I've successfully verified patch #4 against the latest 7.x-2.x-dev with unreadable and missing README.txt files. Thanks, izmeez.

izmeez’s picture

I'm wondering if this can be committed to tidy up the module with a new release? Thanks.

izmeez’s picture

Still pending, any chance of commit and new release?