How to see the validation log messages for a failed module installation?

How to see the validation log messages for a failed module installation?

by Vanyo Georgiev -
Number of replies: 5

I develop a new filter. I prepared a zip file and tried to install it from Site administration - Plugins - Install add-ons. Unfortunately the validation of zip file failed.

How can I see the validation log messages for details?

Debugging is set to DEVELOPER.

 

Average of ratings: -
In reply to Vanyo Georgiev

Re: How to see the validation log messages for a failed module installation?

by Vanyo Georgiev -

OK. This question is stupid. The answer is the validation message is seen on the page. The strange thing is that all messages on this page are OK, but the final result is "Validation failed!". I will try to investigate this more carefully to find what actually happens.

In reply to Vanyo Georgiev

Re: How to see the validation log messages for a failed module installation?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

What is the module and have you got debug level messages set to on?

In reply to Marcus Green

Re: How to see the validation log messages for a failed module installation?

by Vanyo Georgiev -

Very strange thing!

I suppose this is a bug in php interpreter I have.

The result of this lines of code:

        if (is_writable($plugintypepath)) { echo $plugintypepath;
            $this->add_message(self::INFO, 'pathwritable', $plugintypepath);
        } else {
            $this->add_message(self::ERROR, 'pathwritable', $plugintypepath);
            return false;
        }
        return true;

is surprising. The value of $plugintypepath is shown at the top of the page. This means the value returned by is_writable($plugintypepath) is true, but nevertheless the function returns false instead of true as it can be expected.

The server is XAMPP 1.8.2 under Windows 7 and Windows XP. The xampp folder is on a removable disk and I tried it on both Windows versions with the same result.

On a MacBook there is no problem and my filter installs successfully.

The source code of this filter is here: https://github.com/vanyog/multilangsecond

In reply to Vanyo Georgiev

Re: How to see the validation log messages for a failed module installation?

by Darko Miletić -

I would check the file permissions first. Write your own test script and try to write something in a file. 

file_put_contents('directory of moodle/somefile.txt', 'test');

With some additional checks and see what is happening. 

 

In reply to Darko Miletić

Re: How to see the validation log messages for a failed module installation?

by Vanyo Georgiev -

I am sure the 'fliter' directory is writable.

When I add 'return true;' in the first part of 'if' statement like this:

       if (is_writable($plugintypepath)) {
            $this->add_message(self::INFO, 'pathwritable', $plugintypepath);
            return true;
        } else {
            $this->add_message(self::ERROR, 'pathwritable', $plugintypepath);
            return false;
        }
        return true;

Validation check finishes and installation is successful now. But I do not think it is a good idea to change the moodle core code...