File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
app/code/Magento/Indexer/Model/Message
lib/internal/Magento/Framework/App/Console Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,21 @@ class Invalid implements \Magento\Framework\Notification\MessageInterface
13
13
*/
14
14
protected $ collection ;
15
15
16
+ /**
17
+ * @var \Magento\Framework\UrlInterface
18
+ */
19
+ protected $ urlBuilder ;
20
+
16
21
/**
17
22
* @param \Magento\Indexer\Model\Indexer\Collection $collection
23
+ * @param \Magento\Framework\UrlInterface $urlBuilder
18
24
*/
19
25
public function __construct (
20
- \Magento \Indexer \Model \Indexer \Collection $ collection
26
+ \Magento \Indexer \Model \Indexer \Collection $ collection ,
27
+ \Magento \Framework \UrlInterface $ urlBuilder
21
28
) {
22
29
$ this ->collection = $ collection ;
30
+ $ this ->urlBuilder = $ urlBuilder ;
23
31
}
24
32
25
33
/**
@@ -57,9 +65,14 @@ public function getIdentity()
57
65
*/
58
66
public function getText ()
59
67
{
60
- // @codingStandardsIgnoreStart
61
- return __ ('One or more of the indexers are not valid. Please add Magento cron file to crontab or launch cron.php manually. ' );
62
- // @codingStandardsIgnoreEnd
68
+ $ url = $ this ->urlBuilder ->getUrl ('indexer/indexer/list ' );
69
+ //@codingStandardsIgnoreStart
70
+ return __ (
71
+ 'One or more <a href="%1">indexers are invalid</a>. Make sure your <a href="%2" target="_blank">Magento cron job</a> is running. ' ,
72
+ $ url ,
73
+ 'http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-bkg '
74
+ );
75
+ //@codingStandardsIgnoreEnd
63
76
}
64
77
65
78
/**
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class Request implements \Magento\Framework\App\RequestInterface
20
20
public function __construct (array $ parameters = [])
21
21
{
22
22
$ data = getopt (null , $ parameters );
23
- // It can happen that request comes from http, but it runs the console (e.g. pub/ cron.php )
23
+ // It can happen that request comes from http, but it runs the console (e.g. bin/magento cron:run )
24
24
if ($ data ) {
25
25
$ this ->setParams ($ data );
26
26
} else {
You can’t perform that action at this time.
0 commit comments