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

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

написао/ла Vanyo Georgiev -
Број одговора: 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.

 

У одговору на Vanyo Georgiev

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

написао/ла 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.

У одговору на Vanyo Georgiev

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

написао/ла Marcus Green -
Слика Core developers Слика Particularly helpful Moodlers Слика Plugin developers Слика Testers

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

У одговору на Marcus Green

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

написао/ла 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

У одговору на Vanyo Georgiev

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

написао/ла 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. 

 

У одговору на Darko Miletić

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

написао/ла 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...