You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Problems` is a [Grav](http://github.com/getgrav/grav) Plugin and allows to detect issues.
6
6
@@ -26,36 +26,43 @@ You should now have all the plugin files under
26
26
27
27
/your/site/grav/user/plugins/problems
28
28
29
-
>>NOTE: This plugin is a modular component for Grav which requires [Grav](http://github.com/getgrav/grav), the [Error](https://github.com/getgrav/grav-plugin-error) and [Problems](https://github.com/getgrav/grav-plugin-problems) plugins, and a theme to be installed in order to operate.
29
+
> NOTE: This plugin is a modular component for Grav which requires [Grav](http://github.com/getgrav/grav), the [Error](https://github.com/getgrav/grav-plugin-error) and [Problems](https://github.com/getgrav/grav-plugin-problems) plugins, and a theme to be installed in order to operate.
30
30
31
31
# Usage
32
32
33
33
`Problems` runs in the background and most of the time you will not know it is there. Although as soon as an issue is caught, the plugin will let you know.
34
34
35
35
`Problems` checks for the following common issues:
| Apache |`mod_rewrite` is enabled if you are running an Apache server. |
40
+
| PHP Version | PHP version being run by the server meets or exceeds Grav's minimum requirements. |
41
+
| PHP Modules | PHP GD library is installed. |
42
+
|| PHP Curl library is installed. |
43
+
|| PHP Ctype library is installed |
44
+
|| PHP Dom is library installed |
45
+
|| PHP OpenSSL library is installed |
46
+
|| PHP XML library is installed |
47
+
|| PHP Zip library is installed |
48
+
|| PHP Exif library is installed if Exif support is enabled |
49
+
|| PHP OpenSSL library is installed. |
50
+
|| PHP Mbstring library is installed. |
51
+
| Essential Files |`.htaccess` file in Grav's root directory. |
52
+
|| Checks that all the files in the `bin/` folder are exectuable. |
53
+
||`/cache` folder's existence and verifies that it is writeable. |
54
+
||`/logs` folder's existence and verifies that it is writeable. |
55
+
||`/images` folder's existence and verifies that it is writeable. |
56
+
||`/assets` folder's existence and verifies that it is writeable. |
57
+
||`/system` folder's existence. |
58
+
||`/tmp` folder's existence. |
59
+
||`/user/data` folder's existence and verifies that it is writeable. |
60
+
||`/user/images` folder's existence. |
61
+
||`/user/config` folder's existence. |
62
+
||**Error** plugin is installed in `/user/plugins/error`. |
63
+
||`/user/plugins` folder's existence. |
64
+
||`/user/themes` folder's existence. |
65
+
||`/vendor` folder's existence. |
59
66
60
67
If an issue is discovered, you will be greeted with a page that lists these checks and whether or not your install passed or failed them. Green checks mean it passed, and a red x indicates that the there is something amiss with the item.
61
68
@@ -65,25 +72,19 @@ If a change is caught and the cache is refreshed, the plugin will loop through i
65
72
66
73
`Problems` gets also triggered if any fatal exception is caught.
67
74
68
-
# Updating
75
+
# CLI Command
69
76
70
-
As development for the Problems plugin continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Problems is easy, and can be done through Grav's GPM system, as well as manually.
77
+
Problems 2.0 comes with a handy CLI command so you can run the checks at any time
71
78
72
-
## GPM Update (Preferred)
79
+
```bash
80
+
bin/plugin problems check
81
+
```
73
82
74
-
The simplest way to update this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm). You can do this with this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following:
83
+
You should see some output like this:
75
84
76
-
bin/gpm update problems
77
85
78
-
This command will check your Grav install to see if your Problems plugin is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type `y` and hit enter. The plugin will automatically update and clear Grav's cache.
86
+

79
87
80
-
## Manual Update
88
+
#Extending Plugins
81
89
82
-
Manually updating Problems is pretty simple. Here is what you will need to do to get this done:
83
-
84
-
* Delete the `your/site/user/plugins/problems` directory.
85
-
* Download the new version of the Problems plugin from either [GitHub](https://github.com/getgrav/grav-plugin-problems) or [GetGrav.org](http://getgrav.org/downloads/plugins#extras).
86
-
* Unzip the zip file in `your/site/user/plugins` and rename the resulting folder to `problems`.
87
-
* Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing `bin/grav clear-cache`.
88
-
89
-
> Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in `user/config/plugins`) will remain intact.
90
+
You can also extend the problems plugin via the `onProblemsInitialized()` event. The event includes an array of Problems. Simply create your own Problems class that extends the `Grav\Plugin\Problems\Base\Problem` class and add it to the array.
0 commit comments