Giter Site home page Giter Site logo

netgen / ezplatform-site-api Goto Github PK

View Code? Open in Web Editor NEW
37.0 16.0 8.0 1.64 MB

Netgen's Site API is site building productivity layer for eZ/Ibexa Platform

Home Page: https://docs.netgen.io/projects/site-api

License: GNU General Public License v2.0

PHP 98.05% Shell 0.02% Twig 1.92%
ezplatform ezpublish php productivity developer-experience ibexa-platform

ezplatform-site-api's Issues

Release version 3

Minimum requirements will be bumped to PHP 7.1 and eZ Platform 2.4.

Inconsistent results

I have started to use this bundle with ezplatform-kernel 7 but it seems filter service don't work properly.

I hace the following controller and results differ from eZ Search Service. Whats wrong in it?

<?php

namespace AppBundle\Controller;

use eZ\Publish\API\Repository\Values\Content\Query\Criterion\ParentLocationId;
use Netgen\Bundle\EzPlatformSiteApiBundle\Controller\Controller;
use Netgen\Bundle\EzPlatformSiteApiBundle\View\ContentView;
use eZ\Publish\API\Repository\Values\Content\LocationQuery;


class ContentController extends Controller
{
    /**
     * @param \Netgen\Bundle\EzPlatformSiteApiBundle\View\ContentView $view
     *
     * @return \Netgen\Bundle\EzPlatformSiteApiBundle\View\ContentView
     */
    public function indexAction(ContentView $view)
    {
        $locationId = $view->getParameter('locationId');

        $filterService = $this->getSite()->getFilterService();

        $seachService = $this->get('ezpublish.api.service.search');

        $query = new LocationQuery(['filter' => new ParentLocationId($locationId)]);
        $searchResult = $filterService->filterLocations($query);

        // Total count: 0
        dump($searchResult->totalCount);

        $searchResult = $seachService->findContent($query);

        // Total count: 3
        dump($searchResult->totalCount);
        
        return $view;
    }
}

Make bundle compatible with sensio/framework-extra-bundle ^6.0

Currently, the bundle requires sensio/framework-extra-bundle at version ^5.5.
The problem is that since its version 3.3.6, the package ibexa/oss requires sensio/framework-extra-bundle at version ^6.1.0.
So currently it's not possible to install netgen/ezplatform-site-api with the last version of Ibexa DXP.

Could it be possible to require sensio/framework-extra-bundle either at version ^5.5 and ^6.0? (in composer.json: "sensio/framework-extra-bundle": "^5.5|^6.0").

Thanks in advance.

No view template found for custom viewtype in latest ez platform version

Hi Guys,

When using the site api (version 2.5.2 ) and the latest ez platform version (2.2.1) now I'm getting this error:

An exception has been thrown during the rendering of a template ("No view template was set to render the view with the 'module' view type. Check your view configuration.").

Although i have this config:

ezpublish:
    system:
        site_group:
            ngcontent_view:
                full:
                    scaya_default_pages:
                        template: :full:default_page.html.twig
                        match:
                            Identifier\ContentType: [scaya_pages_home, scaya_pages_detail]
                module:
                    youtube_video:
                        template: :modules:youtube-video.html.twig
                        match:
                            Identifier\ContentType: scaya_modules_youtube_video
                    detail_image_text:
                        template: :modules:detail-image-text.html.twig
                        match:
                            Identifier\ContentType: scaya_modules_detail_image_text 

That's the template part:

...
{{ render_esi(controller('ng_content:viewAction', {
            'contentId': module,
            'viewType': 'module',
            'params':{
                'blockPosition': loop.index,
                'isRoot': false,
                'parentContentType': content.contentInfo.contentTypeIdentifier
            }})) }}
...

The automatic rendering of the viewtype full works, only the rendering via controller inside a template is not working somehow.
Using the default content rendering via ez_content:viewAction and using content_view in the config works fine, but then i don't get the site api functions. Even tried to replace the ngcontent_view with content_view

Thanks in advance for your help

Anonymous users do not have access to content.owner property

A usual usecase is to display the name of the content object owner, like the blog post author or so on, but using {{ content.owner.name }} with anonymous users results in UnauthorizedException: User does not have access to 'read' 'content' with: contentId '14'

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.