lakion / cmsplugin Goto Github PK
View Code? Open in Web Editor NEWSimple CMS on top of SymfonyCMF for Sylius applications.
Home Page: http://lakion.com
Simple CMS on top of SymfonyCMF for Sylius applications.
Home Page: http://lakion.com
I need to add them in a current project. If there is interest for it, I can submit a PR.
Does this bundle work with the current Sylius beta version? I would like to give it a try but the version constraints in the composer.json conflict with those of the Sylius beta and e.g. the inventory bundle. Do you plan to make a new release of this bundle?
@michalmarcinkowski I have a weird error that I didn't have on Sylius 1.0.x. Have been researching it, but can't get a clear clue on why it errors yet.. :(
W: > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
W: PHP Fatal error: Uncaught Doctrine\Common\Persistence\Mapping\MappingException: File mapping drivers must have a valid directory path, however the given path [/app/vendor/lakion/cms-plugin/src/Resources/config/doctrine/model] seems to be incorrect! in /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php:61
W: Stack trace:
W: #0 /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php(174): Doctrine\Common\Persistence\Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath('[/app/vendor/la...')
W: #1 /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php(151): Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator->getAllClassNames(NULL)
W: #2 /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php(128): Doctrine\Common\Persistence\Mapping\Driver\FileDriver->getAllClassNames()
W: #3 /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMe in /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php on line 61
Fatal error: Uncaught Doctrine\Common\Persistence\Mapping\MappingException: File mapping drivers must have a valid directory path, however the given path [/app/vendor/lakion/cms-plugin/src/Resources/config/doctrine/model] seems to be incorrect! in /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php:61
Stack trace:
#0 /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php(174): Doctrine\Common\Persistence\Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath('[/app/vendor/la...')
#1 /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php(151): Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator->getAllClassNames(NULL)
#2 /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php(128): Doctrine\Common\Persistence\Mapping\Driver\FileDriver->getAllClassNames()
#3 /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMe in /app/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php on line 61
cc @pamil
More a performance issue than anything, since every product gets loaded on create/update actions.
Gave them @todo
tag for a while.
@ui
Scenario: Deleted taxon should disappear from the registry
Given the store has route "krzysztof-krawczyk"
When I delete route "krzysztof-krawczyk"
Then I should be notified that it has been successfully deleted
And the route "krzysztof-krawczyk" should no longer exist in the store
[PHPCR\InvalidItemStateException]
Item /cms/routes/krzysztof-krawczyk is deleted
Exception trace:
() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Item.php:640
Jackalope\Item->checkState() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Node.php:835
Jackalope\Node->getIdentifier() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/ObjectManager.php:1110
Jackalope\ObjectManager->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Session.php:463
Jackalope\Session->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:3201
Doctrine\ODM\PHPCR\UnitOfWork->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:883
Doctrine\ODM\PHPCR\DocumentManager->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:159
Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->clearDocumentManagers() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:141
Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:152
Symfony\Component\HttpKernel\Kernel->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/friends-of-behat/symfony-extension/src/Listener/KernelRebooter.php:47
FriendsOfBehat\SymfonyExtension\Listener\KernelRebooter->rebootKernel() at n/a:n/a
call_user_func() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:174
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/TestworkEventDispatcher.php:39
Behat\Testwork\EventDispatcher\TestworkEventDispatcher->dispatch() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingScenarioTester.php:117
Behat\Behat\EventDispatcher\Tester\EventDispatchingScenarioTester->tearDown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/IsolatingScenarioTester.php:70
Behat\Behat\Tester\Runtime\IsolatingScenarioTester->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeFeatureTester.php:84
Behat\Behat\Tester\Runtime\RuntimeFeatureTester->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableFeatureTester.php:72
Behat\Behat\Hook\Tester\HookableFeatureTester->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingFeatureTester.php:71
Behat\Behat\EventDispatcher\Tester\EventDispatchingFeatureTester->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeSuiteTester.php:63
Behat\Testwork\Tester\Runtime\RuntimeSuiteTester->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/Hook/Tester/HookableSuiteTester.php:73
Behat\Testwork\Hook\Tester\HookableSuiteTester->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingSuiteTester.php:72
Behat\Testwork\EventDispatcher\Tester\EventDispatchingSuiteTester->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeExercise.php:71
Behat\Testwork\Tester\Runtime\RuntimeExercise->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingExercise.php:70
Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/Ordering/OrderedExercise.php:80
Behat\Testwork\Ordering\OrderedExercise->test() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php:149
Behat\Testwork\Tester\Cli\ExerciseController->testSpecifications() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php:108
Behat\Testwork\Tester\Cli\ExerciseController->execute() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/Cli/Command.php:63
Behat\Testwork\Cli\Command->execute() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:830
Symfony\Component\Console\Application->doRunCommand() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:191
Symfony\Component\Console\Application->doRun() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php:124
Behat\Testwork\Cli\Application->doRun() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:122
Symfony\Component\Console\Application->run() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/behat/behat/bin/behat:34
I ran the following command successfully:
composer require jackalope/jackalope-doctrine-dbal
Using version ^1.3 for jackalope/jackalope-doctrine-dbal
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
- Installing phpcr/phpcr (2.1.4) Downloading: 100%
- Installing phpcr/phpcr-utils (1.3.0) Downloading: 100%
Skipped installation of bin bin/phpcr for package phpcr/phpcr-utils: name conflicts with an existing file
- Installing jackalope/jackalope (1.3.3) Downloading: 100%
- Installing jackalope/jackalope-doctrine-dbal (1.3.0) Downloading: 100%
Skipped installation of bin bin/jackalope for package jackalope/jackalope-doctrine-dbal: name conflicts with an existing file
phpcr/phpcr-utils suggests installing ramsey/uuid (A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).)
Writing lock file
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
// Clearing the cache for the dev environment with debug
// true
[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
Trying to install assets as relative symbolic links.
--- ------------------------------ ------------------
Bundle Method / Error
--- ------------------------------ ------------------
✔ SonataCoreBundle relative symlink
✔ WhiteOctoberPagerfantaBundle relative symlink
--- ------------------------------ ------------------
[OK] All assets were successfully installed.
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
then, when running the next command, I receive an error:
composer require lakion/cms-plugin
Using version dev-master for lakion/cms-plugin
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- doctrine/phpcr-odm 2.0.x-dev requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
- lakion/cms-plugin dev-master requires doctrine/phpcr-odm ^2.0@dev -> satisfiable by doctrine/phpcr-odm[2.0.x-dev].
- Installation request for lakion/cms-plugin dev-master -> satisfiable by lakion/cms-plugin[dev-master].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
am I doing something wrong?
My web application uses:
Lakion\CmsPlugin\Document\CustomBlock
- https://github.com/Lakion/CmsPlugin/blob/master/src/Document/CustomBlock.php
This extends Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ImagineBlock
which is removed because the CMF media bundle is deprecated.
A quick solution would be to bring the old ImagineBlock class into this repository to extend instead:
https://github.com/symfony-cmf/block-bundle/blob/1.3/Doctrine/Phpcr/ImagineBlock.php
Thoughts?
Attempted to call an undefined method named "getParent" of class "PHPCRProxies_CG_\Doctrine\ODM\PHPCR\Document\Resource".
Did you mean to call "getParentDocument"?
This issue is fixed in dev-master branch of doctrine/phpcr-odm
"doctrine/phpcr-odm": "dev-master",
The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is an instance of class PHPCRProxies_CG_\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class PHPCRProxies_CG_\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image to an instance of Symfony\Component\HttpFoundation\File\File.
F.e.: vendor/lakion/sylius-cms-bundle/src/Form/Type/ProductBlockType.php
line 31 - ->add('image', FileType::class, [
needs to be
->add('image', ImageType::class, [
the package is set in the require-dev section, but mentioned in the README as a step you should do.
I'd move it into the suggest
section of composer or make it part of the actual requirements and remove it from the steps as it'd be installed with the plugin.
@michalmarcinkowski thoughts?
Steps to reproduce:
Don't think it's a major bug, rather an inconvenience since there are distinct TaxonBlock and ProductBlock indexes.
I'm trying to upgrade Sylius to dev-master (from beta.2), but requiring the CmsPlugin leads to:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- lakion/cms-plugin dev-master requires sylius/sylius 1.0.0-beta.2 -> satisfiable by sylius/sylius[v1.0.0-beta.2] but these conflict with your requirements or minimum-stability.
- lakion/cms-plugin dev-master requires sylius/sylius 1.0.0-beta.2 -> satisfiable by sylius/sylius[v1.0.0-beta.2] but these conflict with your requirements or minimum-stability.
- lakion/cms-plugin dev-master requires sylius/sylius 1.0.0-beta.2 -> satisfiable by sylius/sylius[v1.0.0-beta.2] but these conflict with your requirements or minimum-stability.
- Installation request for lakion/cms-plugin dev-master -> satisfiable by lakion/cms-plugin[dev-master].
My minimum stability is set to 'dev'. Is there a way to still load dev-master
of Sylius while keeping dev-master
of this package?
I'm using versions:
$ composer info | grep sylius
77:lakion/sylius-cms-bundle dev-master 194229d Simple CMS for Sylius.
157:sylius/sylius dev-master e36787e E-Commerce platform for PHP, based on Symfony framework.
When I go to 'admin/routes/new' the following error is thrown: Parent must be an object NULL given.
Plain text stack trace:
[1] Doctrine\ODM\PHPCR\Exception\InvalidArgumentException: Parent must be an object NULL given.
at n/a
in /var/www/webshop/vendor/symfony-cmf/routing-bundle/src/Doctrine/Phpcr/Route.php line 88
at Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route->setParentDocument(null)
in /var/www/webshop/vendor/lakion/sylius-cms-bundle/src/Factory/RouteFactory.php line 49
at Lakion\SyliusCmsBundle\Factory\RouteFactory->createNew()
in /var/www/webshop/vendor/sylius/sylius/src/Sylius/Bundle/ResourceBundle/Controller/NewResourceFactory.php line 27
at Sylius\Bundle\ResourceBundle\Controller\NewResourceFactory->create(object(RequestConfiguration), object(RouteFactory))
in /var/www/webshop/vendor/sylius/sylius/src/Sylius/Bundle/ResourceBundle/Controller/ResourceController.php line 243
at Sylius\Bundle\ResourceBundle\Controller\ResourceController->createAction(object(Request))
in line
at call_user_func_array(array(object(ResourceController), 'createAction'), array(object(Request)))
in /var/www/webshop/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 153
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
in /var/www/webshop/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 68
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
in /var/www/webshop/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 168
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
in /var/www/webshop/web/app_dev.php line 43
Currently we use egeloen/ckeditor-bundle
. How it is better to add wysiwyg to static content of this plugin? I see that StaticContentType is final class, so should we implement our own class? Maybe we can somehow implement this as a feature directly into this plugin?
Hey, This extension is supposed to be a model for future extensions, I think it should include unit tests as a matter of respect for the Sylius BDD culture.
Looks like the compose requirements all lead to conflicting package versions.
Both blocks should be same as "SimpleBlock" (title, body, image, link), except that they also allow selecting product/taxon and use it when rendering the block itself.
This allows for creating banners linking to appropriate products/categories.
Add simple block, but with image support. I am pretty sure it should be based on ImagineBlock.
Could anyone please change the minimum-stability flag to meet up beta-2? Currently, it's not possible to install the plugin with the beta-2 Sylius even though it works fine with this version.
Thank you in advance.
It seems that in the current version (dev-master) adding routes doesn't function. The adding itself functions, but afterwards accessing a page does not work. It works if the static content has the same 'name', but I don't think that's how routes are meant :)
Reproduce:
Or, am I using this feature totally wrong? If so, I have no clue what Routes is supposed to do then.
Based on Sylius/Sylius#6514.
E.g. keywords & description. I think many people will need them. Not sure it's useful, but there seems to be some CMF / SEO integration available: http://symfony.com/doc/current/cmf/bundles/seo/introduction.html.
The following error occurs when trying to create a block with an image:
The class 'Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image' was not found in the chain configured namespaces FOS\OAuthServerBundle\Document, Doctrine\ODM\PHPCR\Document, Lakion\SyliusCmsBundle\Document, Symfony\Cmf\Bundle\BlockBundle\Model, Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr, Symfony\Cmf\Bundle\ContentBundle\Model, Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr, Symfony\Cmf\Bundle\MenuBundle\Model, Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr, Symfony\Component\Routing, Symfony\Cmf\Bundle\RoutingBundle\Model, Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.