環境
PHP 7.2.21
CakePHP 2.10.18
やりたいこと
pnotifyを追加したところ、下記の様なJsControllerが無いエラーが多数吐かれていたが動作に問題はなかった
が、このまま放置は良くないので出ないように修正したい
error.log
2020-03-04 10:10:58 Error: [MissingControllerException] Controller class JsController could not be found.
Exception Attributes: array (
'class' => 'JsController',
'plugin' => NULL,
)
Request URL: /js/vendor/jquery-pnotify/pnotify.js.map
Stack Trace:
#0 /***/***/***/webroot/index.php(100): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#1 {main}
やったこと
pnotify.custom.min.js
/*
PNotify 3.2.0 sciactive.com/pnotify/
(C) 2015 Hunter Perrin; Google, Inc.
license Apache-2.0
*/
!function(t,i) *******省略******* {"feturn s(i)});
//# sourceMappingURL=pnotify.js.map ←これを削除もしくはmapファイルを追加で対応可能
ここからmapファイルをダウンロードし同階層に格納
https://cdnjs.com/libraries/pnotify
もしくは最下部にあるmapファイルのリンクを削除
pnotify.custom.min.js
//# sourceMappingURL=pnotify.js.map