Имеется старый плагин. https://github.com/philippfrenzel/yii2fullcalendar…. Если делать всё по инструкции, то вываливается ошибка
The file or directory to be published does not exist: domainsyiivendor/bower-asset/fullcalendar/dist
В репозитории https://asset-packagist.org существует только одна старая версия плагина, которая поломана. Как, с минимальной попа-болью можно залить старый проект плагина из репозитория, чтобы:
а) к закачаному модулю подтянулись все зависимости
б) композер его не удалил при очередном Update’e зависитмостей.
в) всё заработало
Composer
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Project Template",
"keywords": ["yii2", "framework", "basic", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"require": {
"php": ">=5.6.0",
"yiisoft/yii2": "~2.0.14",
"yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0",
"dektrium/yii2-user": "*",
"hail812/yii2-adminlte3": "*",
"kartik-v/yii2-sortable-input": "dev-master",
"kartik-v/yii2-editable": "dev-master",
"kartik-v/yii2-grid": "dev-master",
"richardfan1126/yii2-sortable-gridview": "*",
"naduvko/yii2-sortable-grid-view-widget": "*",
"yiisoft/yii2-bootstrap4": "@dev",
"kartik-v/yii2-nav-x": "dev-master",
"kartik-v/yii2-widget-select2": "dev-master",
"sansusan/yii2-jqwidgets-asset": "dev-master",
"kartik-v/yii2-widget-datetimepicker": "dev-master",
"kartik-v/yii2-widget-datepicker": "dev-master",
"solutosoft/yii2-kendoui": "*",
"tigrov/yii2-kendoui": "dev-master",
"aki/yii2-bot-telegram": "*",
"omnilight/yii2-scheduling": "*",
"udokmeci/yii2-phone-validator" : "~1.0.3",
"nex/yii2-datepicker": "*",
"kartik-v/yii2-field-range": "*",
"philippfrenzel/yii2fullcalendarscheduler":"*"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.1.0",
"yiisoft/yii2-gii": "~2.1.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/codeception": "^4.0",
"codeception/verify": "~0.5.0 || ~1.1.0",
"codeception/specify": "~0.4.6",
"symfony/browser-kit": ">=2.7 <=4.2.4",
"codeception/module-filesystem": "^1.0.0",
"codeception/module-yii2": "^1.0.0",
"codeception/module-asserts": "^1.0.0"
},
"config": {
"process-timeout": 1800,
"fxp-asset": {
"enabled": false
}
},
"scripts": {
"post-install-cmd": [
"yii\composer\Installer::postInstall"
],
"post-create-project-cmd": [
"yii\composer\Installer::postCreateProject",
"yii\composer\Installer::postInstall"
]
},
"extra": {
"yii\composer\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
]
},
"yii\composer\Installer::postInstall": {
"generateCookieValidationKey": [
"config/web.php"
]
}
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}
.bowerrc
{
"directory" : "vendor/bower-asset"
}
Папка bower-asset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Error message:
PHP User Error – yiibaseErrorException Exception 'yiibaseInvalidArgumentException' with message 'The file or directory to be published does not exist: C:myProjectvendorbower/jquery/dist'
in C:myProjectvendoryiisoftyii2webAssetManager.php:456
Problem:
yii2 asset manager is looking for the vendor folder bower which does not exist and not bower-asset which does exist. Changes to aliases, composer.json, composer, fxp/composer-asset-plugin do not seem to have any affect on the error.
Have tried the following Stackoverflow recipies:
fix for outdated fxp plugin
aliasing bower
have also tried all of these ‘fixes’ with no change (describes my problem quite precisely)
Setup:
PHP 7.2.11 (same result when tried with 7.1 and 7.0)
Windows 7 Pro 64bit English
Composer Version 1.7.2:
Composer global info:
C:UsersmeDesktoptest2>composer global info
Changed current directory to C:/Users/me/AppData/Roaming/Composer
codeception/codeception 2.0.16 BDD-style testing framework
codeception/specify 0.4.6 BDD code blocks for PHPUnit and Codeception
codeception/verify 0.4.0 BDD assertion library for PHPUnit
doctrine/instantiator 1.1.0 A small, lightweight utility to instantiate object...
facebook/webdriver v0.6.0 A php client for WebDriver
fxp/composer-asset-plugin v1.4.4 NPM/Bower Dependency Manager for Composer
guzzlehttp/guzzle 5.3.3 Guzzle is a PHP HTTP client library and framework ...
guzzlehttp/ringphp 1.1.1 Provides a simple API and specification that abstr...
guzzlehttp/streams 3.0.0 Provides a simple abstraction over streams of data
myclabs/deep-copy 1.8.1 Create deep copies (clones) of your objects
phpdocumentor/reflection-common 1.0.1 Common reflection classes used by phpdocumentor to...
phpdocumentor/reflection-docblock 4.3.0 With this component, a library can provide support...
phpdocumentor/type-resolver 0.4.0
phpspec/prophecy 1.8.0 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage 2.2.4 Library that provides collection, processing, and ...
phpunit/php-file-iterator 1.4.5 FilterIterator implementation that filters files b...
phpunit/php-text-template 1.2.1 Simple template engine.
phpunit/php-timer 2.0.0 Utility class for timing
phpunit/php-token-stream 1.4.12 Wrapper around PHP's tokenizer extension.
phpunit/phpunit 4.7.7 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects 2.3.8 Mock Object library for PHPUnit
psr/log 1.0.2 Common interface for logging libraries
react/promise v2.7.0 A lightweight implementation of CommonJS Promises/...
sebastian/comparator 1.2.4 Provides the functionality to compare PHP values f...
sebastian/diff 1.4.3 Diff implementation
sebastian/environment 1.3.8 Provides functionality to handle HHVM/PHP environm...
sebastian/exporter 1.2.2 Provides the functionality to export PHP variables...
sebastian/global-state 1.1.1 Snapshotting of global state
sebastian/recursion-context 1.0.5 Provides functionality to recursively process PHP ...
sebastian/version 1.0.6 Library that helps with managing the version numbe...
symfony/browser-kit v2.8.46 Symfony BrowserKit Component
symfony/console v2.8.46 Symfony Console Component
symfony/css-selector v2.8.46 Symfony CssSelector Component
symfony/debug v3.0.9 Symfony Debug Component
symfony/dom-crawler v2.8.46 Symfony DomCrawler Component
symfony/event-dispatcher v2.8.46 Symfony EventDispatcher Component
symfony/finder v2.8.46 Symfony Finder Component
symfony/polyfill-ctype v1.9.0 Symfony polyfill for ctype functions
symfony/polyfill-mbstring v1.9.0 Symfony polyfill for the Mbstring extension
symfony/yaml v2.8.46 Symfony Yaml Component
webmozart/assert 1.3.0 Assertions to validate method input/output with ni...
(the above info informs you of this: fxp/composer-asset-plugin v1.4.4 NPM/Bower Dependency Manager for Composer)
Yii2 composer.json: (perhaps here lies the problem?)
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Application Template",
"keywords": ["yii2", "framework", "advanced", "application template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"require": {
"php": ">=7.1.0",
"yiisoft/yii2": "dev-master",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-jui": "@dev",
"kartik-v/yii2-label-inplace": "*",
"kartik-v/yii2-widgets": "*",
"kartik-v/yii2-grid": "*",
"kartik-v/yii2-mpdf": "dev-master@dev",
"kartik-v/yii2-detail-view": "dev-master",
"kartik-v/yii2-password": "dev-master",
"himiklab/yii2-jqgrid-widget" : "@dev",
"dmstr/yii2-adminlte-asset": "2.*",
"philippfrenzel/yii2fullcalendar":"*",
"simplepie/simplepie": "dev-master",
"insolita/yii2-adminlte-widgets": "*",
"attybean/easyii": "dev-master",
"kartik-v/yii2-tabs-x": "*",
"kartik-v/yii2-builder": "dev-master",
"kartik-v/yii2-nav-x": "*",
"kartik-v/yii2-checkbox-x": "*",
"kartik-v/yii2-widget-select2": "@dev",
"wbraganca/yii2-dynamicform": "dev-master",
"nkovacs/yii2-datetimepicker": "*",
"kartik-v/yii2-editable": "*",
"wbraganca/yii2-fancytree-widget": "*",
"bower-asset/sweetalert": "1.1.*",
"bower-asset/sweetalert2": "*",
"kartik-v/yii2-tree-manager": "@dev",
"kartik-v/yii2-context-menu": "*",
"liyunfang/yii2-contextmenu": "*",
"kartik-v/yii2-export": "*",
"attybean/yii2-admin":"dev-master",
"kartik-v/yii2-dynagrid": "@dev",
"kartik-v/yii2-datecontrol": "dev-master",
"2amigos/yii2-multi-select-widget" : "*",
"firebase/php-jwt": "dev-master"
},
"require-dev": {
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*",
"codeception/base": "*",
"phpunit/phpunit": "*",
"codeception/verify": "*"
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
"config": {
"process-timeout": 1800,
"fxp-asset": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"repositories": {
"bower-asset/eve": {
"type":"bower-vcs",
"url":"https://github.com/adobe-webplatform/eve.git"
}
}
}
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}
The results were the same before either «fxp-asset» or repositories: «bower-asset/eve» was added to the config section of composer.json 
Is it possible to track down why yii2 is looking for bower and not bower-asset?
Vendor folder has been deleted and composer cache emptied as well as fxp removed from composer globally and required again.
No, renaming bower-asset to bower is not the preferred solution.
Вопрос:
Я только что установил yii2 (advanced) с помощью композитора. Я установил nginx и т.д.
Но это не работает:
Invalid Parameter – yiibaseInvalidParamException
The file or directory to be published does not exist: /srv/www/site/vendor/bower/jquery/dist
В папке “vendor/bower” есть единственная подпапка “bower-assets” с “jquery” и т.д. в ней. Но не jquery в вендор/беседа.
Как решить эту проблему?
Лучший ответ:
Ответ №1
Убедитесь, что вы выполнили эту команду:
composer global require "fxp/composer-asset-plugin:~1.2.0"
Кроме того, проверьте ваш composer.json для следующих:
Устаревший, но вариант по умолчанию из Yii2:
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
Новая опция
"config": {
"fxp-asset": {
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
}
},
Затем запустите composer update если у вас уже есть файл composer.lock, или composer install если у вас еще нет файла composer.lock.
Ответ №2
Я столкнулся с той же проблемой,
вот как я исправил it-
-
перейти к продавцу.
$ cd projectFile/vendor/ -
Переименуйте бауэр-актив с бауэром
$ mv bower-asset/ bower -
Перезапустите mamp/xamp
Это решило проблему, и http://localhost: 8888/ работает хорошо.
Ответ №3
Проверьте файл composer.json в корневом каталоге вашего проекта. У вас должен быть раздел, который выглядит так:
"asset-installer-paths": {
"bower-asset-library": "vendor/bower-assets"
}
Это говорит композитору, где можно найти библиотеку файлов bower. Возможно, вам понадобится выполнить обновление композитора, чтобы обновить hte-адреса.
Ответ №4
Кажется, ваш jquery/dist находится под bower/bower-asset вместо bower.
Чтобы решить вашу проблему, переместите весь bower-asset контент, включая подкаталог jquery, и другие, такие как: bootstrap, yii2-pjax, puny code и т.д. В папке bower (один уровень вверх). Все эти подпапки будут находиться на одном уровне с bower-asset в папке bower. Теперь вы можете удалить папку bower-asset, если хотите.
Прежде чем вы получили:
vendor/bower/bower-asset/jquery/dist/...
Теперь у вас есть:
vendor/bower/jquery/dist...
Вложенной папки bower-asset не должно быть.
Это решит вашу проблему, и приложение yii2 будет работать так, как должно быть.
Yii2 scheduler fullcalendar widget
1.0.0
2016-09-19 06:45 UTC
README
Installation
The preferred way to install this extension is through composer.
To install, either run
php composer.phar require --prefer-dist ptrnov/yii2-scheduler-fullcalendar "*"
or add
"ptrnov/yii2-scheduler-fullcalendar": "*"
to the require section of your composer.json file.
Usage
See the demos/ folder for all the examples.
Simple usage with array data
//==Create file: Controllers/TestControllers.php //==paste script below namespace appcontrollers; use Yii; use yiiwebController; use yiihelpersArrayHelper; use yiiwebResponse; use yiiwidgetsActiveForm; use yiihelpersJson; class TestController extends Controller { public function actionIndex() { return $this->render('index'); } public function actionForm($start,$end) { return $this->renderAjax('form',[ 'start'=>$start, 'end'=>$end ]); } public function actionDropChild($id,$start,$end){ echo "ID=".$id." START=".$start." EBD=".$end; //$model = Pilotproject::findOne(['ID'=>$id]); //$model->PLAN_DATE1 = $start; //$model->PLAN_DATE2 = $end; // $model->save(); } public function actionEventCalendarSchedule() { $aryEvent=[ ['id' => '1', 'resourceId' => 'b', 'start' => '2016-05-07T02:00:00', 'end' => '2016-05-07T07:00:00', 'title' => 'event 1'], ['id' => '2', 'resourceId' => 'c', 'start' => '2016-05-07T05:00:00', 'end' => '2016-05-07T22:00:00', 'title' => 'event 2'], ['id' => '3', 'resourceId' => 'd', 'start' => '2016-05-06', 'end' => '2016-05-08', 'title' => 'event 3'], ['id' => '4', 'resourceId' => 'e', 'start' => '2016-05-07T03:00:00', 'end' => '2016-05-07T08:00:00', 'title' => 'event 4'], ['id' => '5', 'resourceId' => 'f', 'start' => '2016-05-07T00:30:00', 'end' => '2016-05-07T02:30:00', 'title' => 'event 5'], ]; return Json::encode($aryEvent); } public function actionResourceCalendarSchedule() { $aryResource=[ ['id' => 'a', 'title' => 'Daily Report'], ['id' => 'b', 'title' => 'Auditorium B', 'eventColor' => 'green'], ['id' => 'c', 'title' => 'Auditorium C', 'eventColor' => 'orange'], [ 'id' => 'd', 'title' => 'Auditorium D', 'children' => [ ['id' => 'd1', 'title' => 'Room D1'], ['id' => 'd2', 'title' => 'Room D2'], ], ], ['id' => 'e', 'title' => 'Auditorium E'], ['id' => 'f', 'title' => 'Auditorium F', 'eventColor' => 'red'], ['id' => 'g', 'title' => 'Auditorium G'], ['id' => 'h', 'title' => 'Auditorium H'], ['id' => 'i', 'title' => 'Auditorium I'], ['id' => 'j', 'title' => 'Auditorium J'], ['id' => 'k', 'title' => 'Auditorium K'], ['id' => 'l', 'title' => 'Auditorium L'], ['id' => 'm', 'title' => 'Auditorium M'], ['id' => 'n', 'title' => 'Auditorium N'], ['id' => 'o', 'title' => 'Auditorium O'], ['id' => 'p', 'title' => 'Auditorium P'], ['id' => 'q', 'title' => 'Auditorium Q'], ['id' => 'r', 'title' => 'Auditorium R'], ['id' => 's', 'title' => 'Auditorium S'], ['id' => 't', 'title' => 'Auditorium T'], ['id' => 'u', 'title' => 'Auditorium U'], ['id' => 'v', 'title' => 'Auditorium V'], ['id' => 'w', 'title' => 'Auditorium W'], ['id' => 'x', 'title' => 'Auditorium X'], ['id' => 'y', 'title' => 'Auditorium Y'], ['id' => 'z', 'title' => 'Auditorium Z'], ]; return Json::encode($aryResource); } } //==Create file: views/test/index.php //==paste script below <? use yiihelpersHtml; use yiihelpersUrl; use yiibootstrapModal; use yiiwebJsExpression; use ptrnovfullcalendarFullcalendarScheduler; $JSEventClick = <<<EOF function(calEvent, jsEvent, view) { alert('test'); } EOF; $wgCalendar=FullcalendarScheduler::widget([ 'modalSelect'=>[ /** * modalSelect for cell Select * 'clientOptions' => ['selectable' => true] //makseure set true. * 'clientOptions' => ['select' => function or JsExpression] //makseure disable/empty. if set it, used JsExpressio to callback. * @author piter novian [ptr.nov@gmail.com] //"https://github.com/ptrnov/yii2-fullcalendar". */ 'id' => 'modal-select', //set it, if used FullcalendarScheduler more the one on page. 'id_content'=>'modalContent', //set it, if used FullcalendarScheduler more the one on page. 'headerLabel' => 'Model Header Label', //your modal title,as your set. 'modal-size'=>'modal-lg' //size of modal (modal-xs,modal-sm,modal-sm,modal-lg). ], 'header' => [ 'left' => 'today prev,next', 'center' => 'title', 'right' => 'timelineOneDays,agendaWeek,month,listWeek', ], 'options'=>[ 'id'=> 'calendar_test', //set it, if used FullcalendarScheduler more the one on page. 'language'=>'id', ], 'optionsEventAdd'=>[ 'events' => Url::to(['/test/event-calendar-schedule']), //should be set "your Controller link" 'resources'=> Url::to(['/test/resource-calendar-schedule']), //should be set "your Controller link" //disable 'eventDrop' => new JsExpression($JSDropEvent), 'eventDropUrl'=>'/test/drop-child', //should be set "your Controller link" to get(start,end) from select. You can use model for scenario. 'eventSelectUrl'=>'/test/form', //should be set "your Controller link" to get(start,end) from select. You can use model for scenario ], 'clientOptions' => [ 'language'=>'id', 'selectable' => true, 'selectHelper' => true, 'droppable' => true, 'editable' => true, //'select' => new JsExpression($JSCode), // don't set if used "modalSelect" 'eventClick' => new JsExpression($JSEventClick), 'now' => '2016-05-07', 'firstDay' =>'0', 'theme'=> true, 'aspectRatio'=> 1.8, //'scrollTime'=> '00:00', // undo default 6am scrollTime 'defaultView'=> 'timelineMonth',//'timelineDay',//agendaDay', 'views'=> [ 'timelineOneDays' => [ 'type' => 'timeline', 'duration' => [ 'days' => 1, ], ], ], 'resourceLabelText' => 'Discriptions', 'resourceColumns'=>[ [ 'labelText'=> 'Parent', 'field'=> 'title' ], [ 'labelText'=> 'Subject', 'field'=> 'title' ], [ 'labelText'=> 'Occupancy', 'field'=> 'create_at' ] ], 'resources'=> Url::to(['/test/resource-calendar-schedule']), //should be set "your Controller link" 'events' => Url::to(['/test/event-calendar-schedule']), //should be set "your Controller link" ], ]); ?> <?=$wgCalendar?>

