Giter Club home page Giter Club logo

sonatapagebundle's Introduction

SonataPageBundle

This bundle provides a Site and Page management through container and block services

Latest Stable Version Latest Unstable Version Psalm Type Coverage License

Total Downloads Monthly Downloads Daily Downloads

Branch Github Actions Code Coverage Documentation
4.x Test Coverage Status Documentation Status
5.x Test Coverage Status Documentation Status

Documentation

Check out the documentation on the official website.

Support

For general support and questions, please use StackOverflow.

If you think you found a bug or you have a feature idea to propose, feel free to open an issue after looking at the contributing guide.

License

This package is available under the MIT license.

sonatapagebundle's People

Contributors

acrobat avatar bdejacobet avatar bladrak avatar core23 avatar covex-nn avatar dependabot[bot] avatar eerison avatar franmomu avatar greg0ire avatar gremo avatar hanmac avatar jordisala1991 avatar julesbou avatar mremi avatar oskarstark avatar plouc avatar pulse00 avatar qsomazzi avatar rande avatar rmzamora avatar rosier avatar sepetrov avatar sonataci avatar soullivaneuh avatar sylvaindeloux avatar taluu avatar th3mouk avatar vincentlanglet avatar wbloszyk avatar wharenn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonatapagebundle's Issues

no frontend controls

I try sonata-sandbox and I understand (more or less) how pages and block works.

I started a project from scratch using sonata page bundle but I can't create blocks because when I go to the frontend I don't see "Show Zone" or Edit page controls. I only see a blank header (without controls) and a blank body.

Can you help me?

no "Show Zone" button

I've created new project, using SonataPageBundle.
I'm creating new site, creating the page, but i can't create some blocks for this page. I have no "Show Zone" button and any page controls, when pressed "View page" in backend

Can you help me?
Thanks

Service "sonata.block.manager" missing

After a bin/vendors update, I've got this error :
"The service twig has a dependency on a non-existent service sonata.block.manager"

The problem is :

  1. In the official documentation, you don't write that SonataBlockBundle is required :
    http://sonata-project.org/bundles/page/master/doc/reference/installation.html
  2. In the Github page, it is written :
    https://github.com/sonata-project/SonataPageBundle/blob/master/Resources/doc/reference/installation.rst

So, who says right ? :)
The double documentation is very confusing !

Add a 'name' property to the Block Model

A block model (Model/Block.php) should also have a name to help with the administration of blocks.

Currently, when listing the blocks of a page, you only see the blocks' type. This doesn't give enough information to identify the purpose of each block.

With a name, you can simply describe the block's purpose and have a meaningful list of blocks.

Examples:

  • "Google News RSS Feed" for a rss type block.
  • "Top 5 Latest News" for a news-type block listing 5 published news ordered by date.
    ...

unable to install this via composer

Please provide a version constraint for the sonata-project/page-bundle requirement: 2.1.@dev
composer.json has been updated
Package "2.1.
@dev" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- sonata-project/page-bundle 2.1.x-dev requires symfony-cmf/routing-extra-bundle 1.0.@dev -> no matching package found.
- sonata-project/page-bundle 2.1.0 requires symfony-cmf/routing-extra-bundle 1.0.
@dev -> no matching package found.
- Installation request for sonata-project/page-bundle 2.1.*@dev -> satisfiable by sonata-project/page-bundle 2.1.0, sonata-project/page-bundle 2.1

Potential causes:

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Class 'Sonata\SonataPageBundle\SonataPageBundle' not found

Hi!

I want to install the Sonata Bundle but I got this error:

Fatal error: Class 'Sonata\SonataPageBundle\SonataPageBundle' not found in /usr/local/zend/apache2/htdocs/sonata/Symfony/app/AppKernel.php on line 45

My composer.json:

        "sonata-project/admin-bundle": "dev-master",
        "sonata-project/doctrine-orm-admin-bundle": "dev-master",
        "simplethings/entity-audit-bundle": "dev-master",

        "friendsofsymfony/user-bundle": "*",
        "genemu/form-bundle": "dev-master",
        "sonata-project/seo-bundle": "dev-master",
        "sonata-project/easy-extends-bundle": "dev-master",
        "sonata-project/notification-bundle": "dev-master",
        "sonata-project/page-bundle": "dev-master"
    },

The page-bundle is installed in sonata-project/page-bundle/Sonate/PageBundle/

The other Sonata bundle works perfectly. How does it come? Thanks!

Item "label" for "toggle_enabled" does not exist in "SonataAdminBundle:CRUD:base_list.html.twig" at line 119

Got error when viewing list page list or snap shot list with SonataAdminBundle
Item "label" for "toggle_enabled" does not exist in "SonataAdminBundle:CRUD:base_list.html.twig" at line 119

After looking around the problem is at function

# Sonata\PageBundle\Admin\SnapshotAdmin

    public function getBatchActions()
    {
        $actions = parent::getBatchActions();

        $actions['toggle_enabled'] = $this->trans('toggle_enabled');

        return $actions;
    }

which should be
```php
# Sonata\PageBundle\Admin\SnapshotAdmin

    public function getBatchActions()
    {
        $actions = parent::getBatchActions();

        $actions['toggle_enabled'] = array('label' => $this->trans('toggle_enabled'));

        return $actions;
    }

Doc : double call to sonata esay-extend

There is a problem with the Doc/Installation,

it says :
"You need to generate the correct entities for the page:
php app/console sonata:easy-extends:generate SonataPageBundle"

two times

Cannot run sonata:easy-extends:generate due to exception

Using the latest version of Symfony2, SontaPageBundle and its dependents, I get the following error when I try to run php app/console sonata:easy-extends:generate SonataPageBundle:

[ErrorException]
Notice: Undefined index: services in /Applications/MAMP/htdocs/cads/vendor/bundles/Sonata/PageBundle/DependencyInjection/SonataPageExtension.php line 58

As the installation documentation is not finished, it is not clear to me whether there is supposed to be an extra step where services are specified in the config.yml file.

Note that I successfully ran php app/console sonata:easy-extends:generate SonataUserBundle

The block service `XXX` referenced in the block `YY` is not linked to a cache service.

Hello everyone,
I have created my custom block service called "application.page.block.html" that basically just adds some spicific classes to textarea field to enable WYSIWYG editor in admin. In admin part service works perfectly. But after I have created a block with my new block service frontend page gives me this exception:
An exception has been thrown during the rendering of a template ("The block service 'application.page.block.html' referenced in the block '21' is not linked to a cache service.") in SonataPageBundle:Block:block_container.html.twig at line 17.

Here is my full class:

namespace Application\Sonata\PageBundle\Block;
use Sonata\PageBundle\Block\TextBlockService;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\PageBundle\Model\BlockInterface;
use Sonata\PageBundle\CmsManager\CmsManagerInterface;

/**
 * @author Pavel Shutin
 */
class HtmlBlockService extends TextBlockService
{
/**
 * @inheritdoc
 */
public function buildEditForm(CmsManagerInterface $manager, FormMapper $formMapper, BlockInterface $block)
{
    $formMapper->add('settings', 'sonata_type_immutable_array', array(
        'keys' => array(
            array('content', 'textarea', array('attr'=>array('class'=>'wysiwyg'))),
        )
    ));
}

 /**
 * @return string
 */
    public function getName()
    {
        return 'Html text';
    }
}

As you can see this service extends basic Text service, and changes only 2 functions. Why does my service should be linked to a cache service? As I see cache manager is related to manager, but can I add it via configs/ block service class? Also I can't find where cache service registered for basic Text block service.

Thank you.

No edit constrols

Hi,
I have installed the bundle according to documentation (dev-master though composer), but I cannot edit any page. After creating and publishing a page, going to the frontend shows no edit controls. sonata_page.isEditor in base_layout.html.twig is undefined.

Extending twig blocks in layout

Hello everyone,

Here is another pretty common issue with SonataPageBundle. How can I overwrite any layout twig blocks in my template? Let's say I have page for products and each product has it's own title. Now I need to override "title" block. How can I do this? I thought I just need to override any block in my "child" template to affect parent one.
Here is my product.twig.html:

{% block content %}
    It is {{product.title}}
{% endblock content %}
{%block title%}
    {{product.title}}
{%endblock title%}

It looks like SonataPageBundle doesn't use twig extending engine to render templtes. Why? Did anyone tried to implement this feature?

Update not change slug and url

May be it's not yet implanted ?
Or we could use a preUpdate method ?

public function onPreUpdate()
{
$name = $this->name;
$this->setSlug($name);
$this->setUrl($name);
}

update-core-routes not working

I have followed the installation steps to install SonataPageBundle and all its dependencies. Everything installed with no problems, until I executed the sonata:page:update-core-routes command, then it throwed this error:

[PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'myproject.page__page' doesn't exist

So, what now? I tried to execute a doctrine:generate:entities, but nothing changed, the problem still persists.

Not able to enable bundle

Hi!

I tried to manually setup the bundle in my project (following docs), also clone the sonata sandbox wich add the PageBundle as a submodule.

Everytime I get this error that freeze my project :

Fatal error: Class 'Sonata\PageBundle\Entity\Snapshot' not found in mypath/app/cache/dev/appDevDebugProjectContainer.php on line 4170

The Entity exists and seems to be set up properly...

In logs :
[2012-01-06 18:39:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\RouterListener::onKernelRequest". [] []

Tell me if you need more infos

There is no extension able to load the configuration for "ApplicationSonataPageBundle"

I got this error when running command:

app/console sonata:page:update-core-routes

Error:
There is no extension able to load the configuration for "ApplicationSonataPageBundle" (in /Volumes/Files/Work/php/vouchersupermarket/app/config/config.yml). Looked for namespace "ApplicationSonataPageBundle", found "framework", "security", "twig", "monolog", "swiftmailer", "doctrine", "assetic", "sensio_framework_extra", "jms_security_extra", "brodev_user", "stof_doctrine_extensions", "knp_menu", "fos_user", "brodev_voucher", "sonata_admin", "sonata_page", "sonata_easy_extends", "acme_demo", "web_profiler", "sensio_distribution"

InactiveScopeException while updating core routes

After updating the sonata bundles to the latest versions (dev-master), i'm getting the following exception when running the update-core-routes command:

[Symfony\Component\DependencyInjection\Exception\InactiveScopeException]
 You cannot create a service ("request") of an inactive scope ("request").

The exception is gone when i remove the _sonata_admin route from my routing.yml:

_sonata_admin: 
    resource: .
    type: sonata_admin
    prefix: /admin

Any idea which changes could have introduced this regression?

Catchable Fatal Error: Argument 1 passed to Sonata\PageBundle\Entity\BlockInteractor::__construct()

I'm getting the following error after an update when running the following command:

app/console sonata:page:update-core-routes --site=all

Catchable Fatal Error: Argument 1 passed to Sonata\PageBundle\Entity\BlockInteractor::__construct() must be an instance of Doctrine\Bundle\DoctrineBundle\Registry, instance of Symfony\Bundle\DoctrineBundle\Registry given, called in /vagrant/app/cache/dev/appDevDebug
ProjectContainer.php on line 3225 and defined in /vagrant/vendor/bundles/Sonata/PageBundle/Entity/BlockInteractor.php line 34

No web debug toolbar

After installing the sonata page bundle i didn't have the web debug toolbar anymore.

I have found the problem is that the response content in the Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::injectToolbar is empty.

When in Sonata\PageBundle\CmsManager\PageRenderer line 92 when streamed response is used.

Declaration of Application\Sonata\PageBundle\Entity\Page::addChildren() must be compatible with that of Sonata\PageBundle\Model\PageInterface::addChildren()

Hi, I tried to use Sonata Page Bundle but I get some errors.

I read the installation file, and in this step "app/console sonata:page:update-core-routes"
i get
[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'comunidad.page__page' doesn't exist

Well, I dont know what to do, then I run "php app/console doctrine:generate:entities Sonata" or "php app/console doctrine:generate:entities Application" and i get this errors:

PHP Fatal error: Access level to Sonata\PageBundle\Entity\BaseSnapshot::$createdAt must be protected (as in class Sonata\PageBundle\Model\Snapshot) or weaker in /var/www/comunidad/vendor/bundles/Sonata/PageBundle/Entity/BaseSnapshot.php on line 16

or this

Declaration of Application\Sonata\PageBundle\Entity\Page::addChildren() must be compatible with that of Sonata\PageBundle\Model\PageInterface::addChildren()

or some similar.

What I'm doing wrong. Can you help me?

Thanks!

Add Classes and IDs to the Container for CSS Formatting - Nice to have

I dont know how you want to format your Pages but with the container IDs i think you cant declare speaking CSS-Classnames and IDs.

I added some textfields to the Container Admin Interface. One for classes and one for IDs and edit the Template.

Added to Block/ContainerBlockService.php / public function buildEditForm(CmsManagerInterface $manager, FormMapper $formMapp

            array('classes', 'textarea', array('required' => false)),
            array('ids', 'textarea', array('required' => false)),

Added to Block/ContainerBlockService.php / function getDefaultSettings()

      'classes' => '',
        'ids', '',

Changed from: Resources/views/Block/block_container.html.twig

< div id="cms-block-{{ container.id }}" class="cms-block cms-container{% if not container.hasParent()%} cms-container-root{% else %} cms-block-element{%endif%} {% if page.isInternal %} cms-block-internal{% endif%}">

Changed to:

< div id="cms-block-{{ container.id }} {% if settings.ids is defined %}{{ settings.ids }}{% endif %}" class="cms-block cms-container{% if not container.hasParent()%} cms-container-root{% else %} cms-block-element{%endif%} {% if page.isInternal %} cms-block-internal{% endif%} {% if settings.classes is defined %}{{ settings.classes }}{% endif %}">

I hope i dont understand something wrong in your logic for layouting capabilities.

Problem with Snapshot class

Problem occurs in method setPage.

Problem is in parameter definition, it does not follow given interface SnapshotInterface
public function setPage($page){
$this->page = $page;
}

Solution is:
public function setPage(PageInterface $page){
$this->page = $page;
}

Argument 1 passed to BasePage::setTemplate() must implement interface TemplateInterface

$app/console sonata:page:update-core-routes

Catchable Fatal Error: Argument 1 passed to Sonata\PageBundle\Entity\BasePage::setTemplate() must implement interface Sonata\PageBundle\Model\TemplateInterface, boolean given, called in /home/nexor/projects/www/Symfony/vendor/bundles/Sonata/PageBundle/Entity/PageManager.php on line 104 and defined in /home/nexor/projects/www/Symfony/vendor/bundles/Sonata/PageBundle/Entity/BasePage.php line 362

PageManager::getDefaultTemplate() returns false if no default template found.
But BasePage::setTemplate supports only TemplateInterface parameter, not boolean

https://github.com/sonata-project/SonataPageBundle/blob/master/Entity/PageManager.php#L95
change return count($templates) > 0 ? $templates[0] : false;
to return count($templates) > 0 ? $templates[0] : null;

https://github.com/sonata-project/SonataPageBundle/blob/master/Entity/PageManager.php#L102
https://github.com/sonata-project/SonataPageBundle/blob/master/Entity/BasePage.php#L362

change
BasePage::setTemplate(TemplateInterface $template)
to BasePage::setTemplate(TemplateInterface $template = null)

Bug with CmsPageRouter

Hello everyone.

This morning i've got an error with CmsPageRouter:

Class Sonata\PageBundle\Route\CmsPageRouter contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\Cmf\Component\Routing\VersatileGeneratorInterface::getRouteDebugMessage) in /var/www/html/symfony_project/vendor/sonata-project/page-bundle/Sonata/PageBundle/Route/CmsPageRouter.php on line 313

bootstrap js

In the /web/vendor/sonataadmin/bootstrap/js you have an only two file bootstrap.js and bootstrap.min.js. And, sonataPage call a lot of cut files

        <script src="/bundles/sonataadmin/bootstrap/js/bootstrap-tabs.js" type="text/javascript"></script>
        <script src="/bundles/sonataadmin/bootstrap/js/bootstrap-alerts.js" type="text/javascript"></script>
        <script src="/bundles/sonataadmin/bootstrap/js/bootstrap-modal.js" type="text/javascript"></script>
        <script src="/bundles/sonataadmin/bootstrap/js/bootstrap-twipsy.js" type="text/javascript"></script>
        <script src="/bundles/sonataadmin/bootstrap/js/bootstrap-popover.js" type="text/javascript"></script>
        <script src="/bundles/sonataadmin/bootstrap/js/bootstrap-scrollspy.js" type="text/javascript"></script>
        <script src="/bundles/sonataadmin/bootstrap/js/bootstrap-dropdown.js" type="text/javascript"></script>

the missing blackbar came from this missing js script?

Dependency for SonataNotificationBundle

This should have been added to a new branch, not the current one. This update will break all applications that do not have the SonataNotificationBundle installed.

Please update documentation to reflect the new dependency.

Thanks,
Petrica

Problem with DoctrineParamConverter::__construct()

Hi

I was having a problem in the Sonata Dashboard, where the link to Add New Snapshot was giving me a Catchable Fatal Error with method setPage. I followed the issues #19 and #20, and added the commit 7afc50e, as directed.

Now every link in the Sonata Dashboard (User, Group, Page, Snapshot, with both Add New and List) all give the same error:

Catchable Fatal Error: Argument 1 passed to Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry, instance of Symfony\Bundle\DoctrineBundle\Registry given, called in /Users/barry/Symfony/app/cache/dev/appDevDebugProjectContainer.php on line 1755 and defined in /Users/barry/Symfony/vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php line 31

The error as shown on the log is:

ErrorException: Catchable Fatal Error: Argument 1 passed to Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry, instance of Symfony\Bundle\DoctrineBundle\Registry given, called in /Users/barry/Symfony/app/cache/dev/appDevDebugProjectContainer.php on line 1755 and defined in /Users/barry/Symfony/vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php line 31 (uncaught exception) at /Users/barry/Symfony/vendor/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php line 65

Anybody know whats going on here?

Thanks in advance

Barry

Fatal error: Class 'Mongo' not found

Fatal error: Class 'Mongo' not found in ...Sonata/PageBundle/Cache/MongoCache.php on line 55

This pass: https://github.com/sonata-project/SonataPageBundle/blob/master/DependencyInjection/TweakPass.php#L42

try to load all caches, defined in cache.xml : https://github.com/sonata-project/SonataPageBundle/blob/master/Resources/config/cache.xml

Sonata\PageBundle\Cache\MongoCache::isContextual() returns true

All this caches saved in cache collection in DoctrineORMListener:
https://github.com/sonata-project/SonataPageBundle/blob/master/Cache/Invalidation/DoctrineORMListener.php#L64

When calls entity manager flush, Cache/Invalidation/DoctrineORMListener flush this caches:
https://github.com/sonata-project/SonataPageBundle/blob/master/Cache/Invalidation/DoctrineORMListener.php#L60

It's strange to load all tagged cache services, defined in cache.xml. Better use $configs['caches'] variable and load only defined caches.

Property Sonata\PageBundle\Entity\BaseBlock::$name does not exist

After installing the SonataPageBundle (following the installation.rst doc) I get an error while trying to update the database :

$ php app/console doctrine:schema:update
[ReflectionException]                                              
  Property Sonata\PageBundle\Entity\BaseBlock::$name does not exist

NB: it's a fresh installation of symfony using composer

Fatal error: Class 'Mongo' not found

Hi

I have used "php bin/vendors install" to make sure that I have the most recent version of SonataPageBundle loaded.

When working through the install instructions at http://sonata-project.org/bundles/page/master/doc/reference/installation.html I get down towards the end and enter the following command:

app/console sonata:page:update-core-routes

In my Terminal I get the following:

Updating/Creating hybrid pages

UPDATE acme_demo_secured_hello /demo/secured/hello
UPDATE AcmeUserBundle_homepage /hello/{name}
UPDATE fos_user_security_login /login
UPDATE fos_user_security_check /login_check
UPDATE fos_user_security_logout /logout

Fatal error: Class 'Mongo' not found in /Users/barry/Symfony/vendor/bundles/Sonata/PageBundle/Cache/MongoCache.php on line 55

Everything was working before I installed SonataPageBundle

Thanks in advance

Barry

No default template defined

I create project from sonata sandbox
install all deps:
./bin/vendors install --reinstall

After fixing issues
#2
#3

I try to setup page bundle:
app/console doctrine:schema:create

app/console fos:user:create
app/console fos:user:activate
app/console fos:user:promote

app/console sonata:page:update-core-routes
app/console sonata:page:create-snapshots

Got exception:

An exception has been thrown during the rendering of a template ("No default template defined") in SonataPageBundle::layout.html.twig at line 61.

i manually create record in page__template table:
INSERT INTO symfony.page__template (id, name, path, enabled, content) VALUES ('1', 'test', '', NULL, NULL);

Problem with Console for Sonata Page

Problem with Console for Sonata Page

On my web host when using SSH the default PHP CLI version is 5.2 to get 5.3 commands have to be prefixed with /usr/bin/php-5.3

When I try to run this command
bash-3.2$ /usr/bin/php-5.3 ./app/console sonata:page:create-snapshots -site=all

I get the error
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /var/sites/t/town.tekhoi.com/app/console on line 6

Line 6 is the first namespace line:
use Symfony\Bundle\FrameworkBundle\Console\Application;

This ONLY a problem with Sonata Page console commands all other commands are fine

I suspect somewhere the default PHP binary is being called?

actionBlockService Parameters not available

Hi there,

i don't know if it is my fault but wenn i add a ActionBlock to one of my Containers everything is fine only the Parameters are not available in my action.

In the Function execute in Block/actionBlockService my Parameters are available but they are not available in my action.

public function execute(CmsManagerInterface $manager, BlockInterface $block, PageInterface $page, Response $response = null)
{
$parameters = (array)json_decode($block->getSetting('parameters'), true);
//Here i can make a print_r($parameters) and everything is fine!
$parameters = array_merge($parameters, array('_block' => $block, '_page' => $page));
$settings = array_merge($this->getDefaultSettings(), (array)$block->getSettings());
try {
$actionContent = $this->kernel->render($settings['action'], $parameters);
} catch (\Exception $e) {
throw $e;
}

    $content = Mustache::replace($block->getSetting('layout'), array(
        'CONTENT' => $actionContent
    ));

    return $this->renderResponse('SonataPageBundle:Block:block_core_action.html.twig', array(
        'content'   => $content,
        'block'     => $block,
        'page'      => $page,
    ), $response);
}

Is this an Issue in the kernel->render function?

My Action looks like these:

public function sliderAction()
{
    $request = $this->get('request');
    $main_feeds = $request->request->get('main_feeds');
}

And the Parameters are defined in the Container:
{"main_feeds":"Tv"}

Best regards
Itze

Routing issue with installation in a sub-directory

In parameters.yml I have
sub_dir: /mnc

In config.yml:

sonata:
resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
prefix: %sub_dir%/secured/admin
_sonata_admin:
resource: .
type: sonata_admin
prefix: /mnc/secured/admin

Up to here everything works fine, but if I use

sonata:
resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
prefix: %sub_dir%/secured/admin
_sonata_admin:
resource: .
type: sonata_admin
prefix: %sub_dir%/secured/admin

I get a route not found error.
I checked that in the latter case the line

    if (0 === strpos($pathinfo, '/%sub_dir%/secured/admin')) {

is generated in the cache file appdevUrlMatcher.php, which should in fact be

    if (0 === strpos($pathinfo, '/mnc/secured/admin')) {.

Regards

How to disable "autocreating" of hybrid pages

I dont know why but SonataPage generates different strange pages e.g. "_internal". How can I disable it? What is "_internal" page and why it doesn't generated automatically with "decorate = 0"?

Create a new site with path

Hi, I want to know if anyone has had this error when you create a website eg: localhost/website1 /

Error : An exception has been thrown during the rendering of a template ("The security context contains no authentication token. One possible reason may be that there is no firewall configured for this URL.") in "SonataPageBundle::layout.html.twig".

Thank you for your help !

Exception pages

I have a couple of issues related to exception pages.

  1. At exception pages layout is doubled because "Exception listener" renders the page first time, then "Response listener" wraps response with another rendering.
  2. Exception pages are not created at app/console sonata:page:update-core-routes. I have to manually trigger 403, 404 and 500 errors to create pages.

Btw question, can I somehow disable "autocreating" of hybrid pages on visiting it?

ACL system don't work properly

In SPB only the super admin user can use all the features of the bundle... if some non super-admin user with the permissions EDITOR (or even with ADMIN permissions) try to work with the bundle, he must be has this issues:

  • When he create a new page, it will not has access to edit it... the only way to assign the correct rights is running the command app/console sonata:admin:generate-object-acl... and this is a issue because the final user don't has access to the console.
  • When you create some page snapshot, the controller redirect you after the operation and show a permissions error (even if the permission is assigned to the user)
  • When some page has a parent, and the parent has the child as a target... the page cannot be edited for non super-admin use

page_defaults parameter not working

i'm trying to disable decoration for some pages whose routes are defined in my bundle. however, when i run the update-core-routes and create-snapshot commands, the decorate field is set to 1 in the database for the pages/snapshots.

I've searched through the code where the page_defaults configuration parameter is used to turn of decoration for those pages, but i cant't find this anywhere.

am i missing something here?

There was an error running update-core-routes command

app/console sonata:page:update-core-routes --site=all

....
UPDATE catchAll /{path}
Fatal error: Call to undefined method Sonata\PageBundle\CmsManager\CmsPageManager::getHttpErrorCodes() in /Users/i/www/sandbox/vendor/bundles/Sonata/PageBundle/Command/UpdateCoreRoutesCommand.php on line 132
done!

I think the command ran successfully but this error message worries me.. :S

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.