Missing css and js files in Resources/public/vendor
sadok-f opened this issue · 33 comments
Hi,
I'm trying to install Symfony CMF and I got an exception that a lot of files missing in folder Resources/public/vendor
Called in :
- /vendor/symfony-cmf/create-bundle/Symfony/Cmf/Bundle/CreateBundle/Resources/views/includecssfiles.html.twig
- /vendor/symfony-cmf/create-bundle/Symfony/Cmf/Bundle/CreateBundle/Resources/views/includejsfiles-create.html.twig
- /vendor/symfony-cmf/create-bundle/Symfony/Cmf/Bundle/CreateBundle/Resources/views/includejsfiles-ckeditor.html.twig
I checked in Resources/public/vendor in master branch and its empty.
Thanks
The template files are located in https://github.com/symfony-cmf/CreateBundle/tree/master/Resources/views
ie. Resources/views
Resources/public/vendor is only used for the js/css files form 3rd parties
Do we have a typo in the docs somewhere?
I just follow the installation guide from
http://symfony.com/doc/master/cmf/book/installation.html
and I got this exception.
can you paste the exact exception?
also can you paste the output from composer show --installed
?
Yes sure:
An exception has been thrown during the compilation of a template ("Unable to find file "@CmfCreateBundle/Resources/public/vendor/ckeditor/ckeditor.js".") in "CmfCreateBundle::includejsfiles-ckeditor.html.twig".
composer show --installed
doctrine/annotations v1.2.0 Docblock Annotations Parser doctrine/cache v1.3.0 Caching library offering an object-oriented API for many cache backends doctrine/collections v1.2 Collections Abstraction library doctrine/common v2.4.2 Common Library for Doctrine projects doctrine/data-fixtures v1.0.0 Data Fixtures for all Doctrine Object Managers doctrine/dbal v2.4.2 Database Abstraction Layer doctrine/doctrine-bundle v1.2.0 Symfony DoctrineBundle doctrine/doctrine-cache-bundle 1.0.0 Symfony2 Bundle for Doctrine Cache doctrine/inflector v1.0 Common String Manipulations with regard to casing and singular/plural rules. doctrine/lexer v1.0 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. doctrine/phpcr-bundle 1.1.0 Symfony DoctrinePHPCRBundle doctrine/phpcr-odm 1.1.2 Object-Document-Mapper for PHPCR friendsofsymfony/rest-bundle 1.4.1 This Bundle provides various tools to rapidly develop RESTful API's with Symfony2 fzaninotto/faker v1.4.0 Faker is a PHP library that generates fake data for you. incenteev/composer-parameter-handler v2.1.0 Composer script handling your ignored parameter file jackalope/jackalope 1.1.3 Jackalope PHPCR library jackalope/jackalope-doctrine-dbal 1.1.2 Jackalope Transport library for Doctrine DBAL jdorn/sql-formatter v1.2.17 a PHP SQL highlighting library jms/metadata 1.5.1 Class/method/property metadata management in PHP jms/parser-lib 1.0.0 A library for easily creating recursive-descent parsers. jms/serializer 0.16.0 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML. jms/serializer-bundle 0.13.0 Allows you to easily serialize, and deserialize data of any complexity knplabs/knp-menu v1.1.2 An object oriented menu library knplabs/knp-menu-bundle v1.1.2 This bundle provides an integration of the KnpMenu library kriswallsmith/assetic v1.1.2 Asset Management for PHP liip/functional-test-bundle 1.0.2 This bundles provides additional functional test-cases for Symfony2 applications midgard/createphp 1.0.0 PHP adapter for Create.js monolog/monolog 1.10.0 Sends your logs to files, sockets, inboxes, databases and various web services nelmio/alice 1.7.0 Expressive fixtures generator phpcollection/phpcollection 0.4.0 General-Purpose Collection Library for PHP phpcr/phpcr 2.1.1 PHP Content Repository interfaces phpcr/phpcr-utils 1.1.1 PHP Content Repository implementation independant utilities phpoption/phpoption 1.4.0 Option Type for PHP psr/log 1.0.0 Common interface for logging libraries sensio/distribution-bundle v2.3.4 The base bundle for the Symfony Distributions sensio/framework-extra-bundle v2.3.4 This bundle provides a way to configure your controllers with annotations sensio/generator-bundle v2.3.5 This bundle generates code for you sonata-project/block-bundle 2.2.11 Symfony SonataBlockBundle sonata-project/cache 1.0.3 Cache library sonata-project/core-bundle 2.2.6 Symfony SonataCoreBundle swiftmailer/swiftmailer v5.2.1 Swiftmailer, free feature-rich PHP mailer symfony-cmf/block-bundle 1.1.1 Symfony CMF Block Bundle symfony-cmf/content-bundle 1.1.0 Symfony CMF Content Bundle symfony-cmf/core-bundle 1.1.0 Symfony CMF Core Bundle symfony-cmf/create-bundle 1.1.0 Symfony Bundle for createphp and create.js. The easiest way to make any site editable and have semantic annotations with RDFa. symfony-cmf/media-bundle 1.1.0 Symfony CMF Media Bundle symfony-cmf/menu-bundle 1.1.1 Symfony CMF Menu Bundle symfony-cmf/routing 1.2.0 Extends the Symfony2 routing component for dynamic routes and chaining several routers symfony-cmf/routing-bundle 1.2.0 Symfony RoutingBundle symfony-cmf/simple-cms-bundle 1.1.0 A simple CMS bundle based on the Symfony CMF symfony-cmf/symfony-cmf 1.1.0 Symfony Content Management Framework symfony/assetic-bundle v2.3.0 Integrates Assetic into Symfony2 symfony/icu v1.2.2 Contains an excerpt of the ICU data and classes to load it. symfony/monolog-bundle v2.3.0 Symfony MonologBundle symfony/swiftmailer-bundle v2.3.7 Symfony SwiftmailerBundle symfony/symfony v2.3.18 The Symfony PHP framework twig/extensions v1.0.1 Common additional features for Twig that do not directly belong in core twig/twig v1.16.0 Twig, the flexible, fast, and secure template language for PHP willdurand/jsonp-callback-validator v1.1.0 JSONP callback validator. willdurand/negotiation 1.3.3 Content Negotiation tools for PHP provided as a standalone library.
Ah the issue is not that the template is missing but that the css/js files are missing:
An exception has been thrown during the compilation of a template ("Unable to find file "@CmfCreateBundle/Resources/public/vendor/ckeditor/ckeditor.js".") in "CmfCreateBundle::includejsfiles-ckeditor.html.twig".
There is a composer script handler responsible for downloading these:
https://github.com/symfony-cmf/standard-edition/blob/master/composer.json#L45
I think there might be an issue there .. can you run composer install
again and check if there are any errors?
Yes the files is missing,
I have the 45 line in my composer already
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
when I run
composer installI got
Nothing to install or update
you should see something like (see the last bit from my paste):
lsmith@localhost standard-edition (master)$ composer install --prefer-source
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
Updating the "app/config/parameters.yml" file
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for Sonata\CoreBundle into web/bundles/sonatacore
Installing assets for Symfony\Cmf\Bundle\CreateBundle into web/bundles/cmfcreate
Installing assets for Acme\DemoBundle into web/bundles/acmedemo
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
Download or update create
Download or update ckeditor
remote: Counting objects: 691, done.
remote: Compressing objects: 100% (417/417), done.
remote: Total 691 (delta 520), reused 331 (delta 260)
Receiving objects: 100% (691/691), 1.12 MiB | 225.00 KiB/s, done.
Resolving deltas: 100% (520/520), done.
From https://github.com/ckeditor/ckeditor-releases
86ddb21..7c4d8c1 4.4.x -> origin/4.4.x
e549d79..3e46c7c basic/4.4.x -> origin/basic/4.4.x
e549d79..3e46c7c basic/latest -> origin/basic/latest
e549d79..3e46c7c basic/stable -> origin/basic/stable
731ff16..7af7517 full/4.4.x -> origin/full/4.4.x
731ff16..7af7517 full/latest -> origin/full/latest
731ff16..7af7517 full/stable -> origin/full/stable
86ddb21..7c4d8c1 latest -> origin/latest
43c7fcc..7c4d8c1 master -> origin/master
86ddb21..7c4d8c1 stable -> origin/stable
9cd883e..6c3b9ae standard/4.4.x -> origin/standard/4.4.x
9cd883e..6c3b9ae standard/latest -> origin/standard/latest
9cd883e..6c3b9ae standard/stable -> origin/standard/stable
* [new tag] 4.4.3 -> 4.4.3
* [new tag] basic/4.4.3 -> basic/4.4.3
* [new tag] full/4.4.3 -> full/4.4.3
* [new tag] standard/4.4.3 -> standard/4.4.3
* [new tag] 4.4.2 -> 4.4.2
* [new tag] basic/4.4.2 -> basic/4.4.2
* [new tag] full/4.4.2 -> full/4.4.2
* [new tag] standard/4.4.2 -> standard/4.4.2
Yes I have all missing files from cmfcreate/vendor after runing this commad
composer install --prefer-source
Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update Generating autoload files Updating the "app/config/parameters.yml" file Clearing the cache for the dev environment with debug true Installing assets using the hard copy option Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework Installing assets for Sonata\CoreBundle into web/bundles/sonatacore Installing assets for Symfony\Cmf\Bundle\CreateBundle into web/bundles/cmfcreate Installing assets for Acme\DemoBundle into web/bundles/acmedemo Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution Download or update create Download or update ckeditor
Yes without --prefer-source</code I didnt have the files in cmfcreate/vendor
@sadoknet How did you install it or which version? symfony-cmf/standard-edition@15eaa91 should have fixed this issue.
I followed the instructions in http://symfony.com/doc/master/cmf/book/installation.html
php composer.phar create-project symfony-cmf/standard-edition ~1.1
d'oh. thanks @hacfi that sounds like the problem. composer will pick a stable version and i did not tag a new release after that fix. did that now, so when you try again @sadoknet you should get version 1.1.1. does that work for you?
You’ll have to wait a couple of minutes until packagist processes the update but afterwards it should work @sadoknet
ok I'll let you know about it.
Thanks a lot :)
Update seems to be completed. Make sure it says Installing symfony-cmf/standard-edition (1.1.1)
. If it downloads 1.1.0 try removing the cache(?) by running "rm -rf ~/.composer/cache" or use composer create-project symfony-cmf/standard-edition cmf_se "~1.1.1"
for now.
Yes its work now:
Installing symfony-cmf/standard-edition (1.1.1) - Installing symfony-cmf/standard-edition (1.1.1) Downloading: 100% ...
Lovely..so we can close the issue!?
ok,
I dont know if its related to this issue or not but when I run the create project I got this error:
composer create-project symfony-cmf/standard-edition cmf/ ~1.1 Installing symfony-cmf/standard-edition (1.1.1) - Installing symfony-cmf/standard-edition (1.1.1) Loading from cache Created project in news/ Loading composer repositories with package information Installing dependencies (including require-dev) PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 33 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Rule.php on line 62
I even tried to increase memory_limit to 256M in my php.ini
@sadoknet It looks like it’s already at 512M (536870912 byte). You can temporarily set it higher by running
php -d memory_limit=1024M /usr/local/bin/composer create-project symfony-cmf/standard-edition cmf/ "~1.1"
or even
php -d memory_limit=-1 /usr/local/bin/composer create-project symfony-cmf/standard-edition cmf/ "~1.1"
I just tried myself and noticed that 1.1.1 takes more than double the memory. Looks like symfony-cmf/standard-edition@a09708a increased the workload a lot. Not sure if that’s normal.
@hacfi The only affect that symfony-cmf/standard-edition@a09708a might have had is that Composer takes more versions into account when calculating the best matching package. Hence it consumes more memory. Though I don't know what we can with that. If I am not mistaken, it's more a Composer issue.
once we release 1.2 we can remove the minimum-stability again and only
consider stable releases. otherwise i would not know. hopefully work on
composer continues and sombody comes up with improvements on memory needs.
note that once you have a lock file and do composer install
on your
servers, there should be no problem as composer does not look at
alternative versions for install, only when updateing.
@dbu Thinking about this I wondered if it would make any difference if we add prefer-stable: true
or is that the default value even with minimum-stability
being dev
?
i think it is the default, yes. but i guess composer still loads
everything first.
Ok I still got more errors:
After installing everything with composer, I have this exception appears:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] To use menu options extionsion, you need sonata-project/SonataAdminBundle in your project.
I even installed SonadaAdminBundle and I still have the same exception.
composer show --installed
doctrine/annotations dev-master e93f3b7 Docblock Annotations Parser doctrine/cache dev-master 72121e6 Caching library offering an object-oriented API for many cache backends doctrine/collections dev-master 432240f Collections Abstraction library doctrine/common 2.4.x-dev ae92d07 Common Library for Doctrine projects doctrine/data-fixtures dev-master e847b07 Data Fixtures for all Doctrine Object Managers doctrine/dbal 2.4.x-dev 1b62e9f Database Abstraction Layer doctrine/doctrine-bundle v1.2.0 Symfony DoctrineBundle doctrine/doctrine-cache-bundle dev-master 03b4890 Symfony2 Bundle for Doctrine Cache doctrine/inflector dev-master 64de2fe Common String Manipulations with regard to casing and singular/plural rules. doctrine/instantiator dev-master bbb57e0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors doctrine/lexer dev-master db77c80 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. doctrine/phpcr-bundle 1.1.x-dev 434f37b Symfony DoctrinePHPCRBundle doctrine/phpcr-odm dev-master 37eeb85 Object-Document-Mapper for PHPCR friendsofsymfony/rest-bundle dev-master 4df33da This Bundle provides various tools to rapidly develop RESTful API's with Symfony2 fzaninotto/faker dev-master 36d0322 Faker is a PHP library that generates fake data for you. incenteev/composer-parameter-handler dev-master 15b15d8 Composer script handling your ignored parameter file jackalope/jackalope dev-master 327ee5a Jackalope PHPCR library jackalope/jackalope-doctrine-dbal dev-master 50b9a87 Jackalope Transport library for Doctrine DBAL jdorn/sql-formatter dev-master ff0515f a PHP SQL highlighting library jms/metadata dev-master 22b7245 Class/method/property metadata management in PHP jms/parser-lib dev-master 6067cc6 A library for easily creating recursive-descent parsers. jms/serializer dev-master da86234 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML. jms/serializer-bundle dev-master 3a980e5 Allows you to easily serialize, and deserialize data of any complexity knplabs/knp-menu 1.1.x-dev f8e8672 An object oriented menu library knplabs/knp-menu-bundle 1.1.x-dev 2fecac0 This bundle provides an integration of the KnpMenu library kriswallsmith/assetic 1.1.x-dev ddaccff Asset Management for PHP liip/functional-test-bundle dev-master 2574c9d This bundles provides additional functional test-cases for Symfony2 applications midgard/createphp 1.0.0 PHP adapter for Create.js monolog/monolog dev-master 12545cd Sends your logs to files, sockets, inboxes, databases and various web services nelmio/alice 1.x-dev 6af8d4e Expressive fixtures generator phpcollection/phpcollection dev-master 94a2c04 General-Purpose Collection Library for PHP phpcr/phpcr dev-master fb489e4 PHP Content Repository interfaces phpcr/phpcr-utils 1.1.x-dev 25e62cd PHP Content Repository implementation independant utilities phpoption/phpoption 1.4.0 Option Type for PHP psr/log dev-master a78d650 Common interface for logging libraries sensio/distribution-bundle v2.3.4 The base bundle for the Symfony Distributions sensio/framework-extra-bundle 2.3.x-dev f9e4c97 This bundle provides a way to configure your controllers with annotations sensio/generator-bundle dev-master 3acd15b This bundle generates code for you sonata-project/admin-bundle dev-master 9a361cb Symfony SonataAdminBundle sonata-project/block-bundle 2.2.11 Symfony SonataBlockBundle sonata-project/cache dev-master 548b14c Cache library sonata-project/core-bundle dev-master 8bbc05a Symfony SonataCoreBundle sonata-project/exporter 1.3.3 Lightweight Exporter library swiftmailer/swiftmailer dev-master 62478c4 Swiftmailer, free feature-rich PHP mailer symfony-cmf/block-bundle dev-master 215bf29 Symfony CMF Block Bundle symfony-cmf/content-bundle dev-master c437b56 Symfony CMF Content Bundle symfony-cmf/core-bundle dev-master 7b64926 Symfony CMF Core Bundle symfony-cmf/create-bundle dev-master c12d644 Symfony Bundle for createphp and create.js. The easiest way to make any site editable and have semantic annotations wi... symfony-cmf/media-bundle dev-master 260a8a0 Symfony CMF Media Bundle symfony-cmf/menu-bundle dev-master e128da1 Symfony CMF Menu Bundle symfony-cmf/routing 1.2.x-dev 48be48d Extends the Symfony2 routing component for dynamic routes and chaining several routers symfony-cmf/routing-bundle dev-master f3546cf Symfony RoutingBundle symfony-cmf/simple-cms-bundle dev-master 4abbd6a A simple CMS bundle based on the Symfony CMF symfony-cmf/symfony-cmf dev-master f8ab975 Symfony Content Management Framework symfony/assetic-bundle 2.3.x-dev 099e0bb Integrates Assetic into Symfony2 symfony/icu 1.2.x-dev d4d85d6 Contains an excerpt of the ICU data and classes to load it. symfony/monolog-bundle 2.3.x-dev f105e8c Symfony MonologBundle symfony/swiftmailer-bundle dev-master bff639d Symfony SwiftmailerBundle symfony/symfony 2.3.x-dev 65862c9 The Symfony PHP framework twig/extensions v1.0.1 Common additional features for Twig that do not directly belong in core twig/twig dev-master e2d2a25 Twig, the flexible, fast, and secure template language for PHP willdurand/jsonp-callback-validator v1.1.0 JSONP callback validator. willdurand/negotiation dev-master a98fb6b Content Negotiation tools for PHP provided as a standalone library.
This is caused by a recent feature addition which will be fixed again once the following PR is merged:
symfony-cmf/menu-bundle#204
However it seems like you are pulling in dev dependencies which always run the risk of being broken or incompatible.
@lsmith77 That’s currently set in the CMF standard edition: https://github.com/symfony-cmf/standard-edition/blob/master/composer.json#L16
hrmm .. we should not have that set .. guess we need to branch 1.1 and remove the option there.
when creating the project with php composer.phar create-project symfony-cmf/standard-edition <path-to-install> ~1.1
as written in the doc (1st option) composer should install the stable version. however we have the same problem in https://github.com/symfony-cmf/standard-edition/blob/1.1.1/composer.json#L16 too
but i guess cloning / forking the SE is very natural, so we really should start to have a stable master and do things for the next version in a dev branch, as we do with the doc.
the menu problem should now go away, i merged the fix lukas mentioned. fine for you?
Yes work fine now.
Thanks :)