Coder Social home page Coder Social logo

netgen / ibexa-site-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 8.0 3.0 2.28 MB

Site building productivity layer for the Ibexa CMS

Home Page: https://netgen.io

License: GNU General Public License v2.0

PHP 98.23% Twig 1.75% Shell 0.02%
php ibexa dx developer-experience productivity ibexa-bundle

ibexa-site-api's Introduction

Netgen's Site API for Ibexa CMS

Build Status Read the Docs Downloads Latest stable PHP Ibexa

Netgen's Site API is a productivity layer built for Ibexa CMS developers, designed to remove the need for boilerplate code and make the development of Ibexa CMS sites more accessible and less fallible.

By removing the need to write PHP to solve common problems, Site API enables less technical people and other developers beside PHP ones to do more - such as content creators, project managers and frontend developers. With its PHP API it also simplifies things for PHP developers, freeing them from having to continually reinvent the wheel and giving them more time to spend on the custom backend logic.

Find out more on the documentation site and join #ez-site-api channel on eZ Community Slack (invite).

ibexa-site-api's People

Contributors

amalija-ramljak avatar emodric avatar iherak avatar joezg avatar leohajder avatar marioblazek avatar mivancic avatar petramiseta avatar pspanja avatar randycupic avatar wizhippo avatar zulicek avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ibexa-site-api's Issues

Richtext with embed image causes infinite loop

I'm using ibexa-site-api 6.1.2 with Ibexa 4.6.3.

Steps to reproduce:
In admin area, within a richtext field, embed an image. Save and publish.
The image is rendered correctly in admin preview.

On front-end, I'm trying to render that field using:
{{ ng_render_field(content.fields.text_area) }} inside the template, but when I'm trying to check/visit in browser the page that contains that field, it keeps loading on and on in a infinite loop until the memory limit is hit.

I also tried with the Ibexa's default twig method and Ibexa's default Content type using:
{{ ibexa_render_field(content.innerContent, 'text_area') }}
but I get the same result => Infinite loop.

The only solution I've found so far, is to disable somehow the Netgen's functionality, according to the documentation, by adding this parameter in a yaml file:

bexa.site_access.config.default.ng_site_api.fallback_without_subrequest: false

Then, the page loads correctly and the richtext is rendered correctly as well.

I've checked the field's value in the database directly, and it looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
    xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0">
    <title ezxhtml:level="2">
        <emphasis role="strong">Title - online</emphasis>
        <emphasis role="strong"> und als App</emphasis>
    </title>
    <para> </para>
    <ezembed xlink:href="ezcontent://43910" view="embed" ezxhtml:class="ez-embed-type-image">
        <ezconfig>
            <ezvalue key="size">fullwidth</ezvalue>
        </ezconfig>
    </ezembed>
    <para>Text text <link xlink:href="ezurl://548" xlink:show="new"
            xlink:title="Text test">
            <emphasis role="strong">Testing</emphasis>
        </link>. Testing. </para>
    <para> </para>
    <eztemplate name="button" ezxhtml:class="ez-custom-tag ez-custom-tag--attributes-visible">
        <ezcontent>
            <para> </para>
        </ezcontent>
        <ezconfig>
            <ezvalue key="content">Test</ezvalue>
            <ezvalue key="internal_link">
                https://www.testing.com/testing</ezvalue>
            <ezvalue key="form">none</ezvalue>
            <ezvalue key="form_settings">none</ezvalue>
            <ezvalue key="color">white</ezvalue>
            <ezvalue key="align">center</ezvalue>
            <ezvalue key="width">auto</ezvalue>
        </ezconfig>
    </eztemplate>
    <para> </para>
</section>

As it can be seen, the embed element is defined in this XML content using ezembed tag. If I remove the entire ezembed code:
<ezembed xlink:href="ezcontent://43910" view="embed" ezxhtml:class="ez-embed-type-image"> <ezconfig> <ezvalue key="size">fullwidth</ezvalue> </ezconfig> </ezembed>
after clearing the cache, the page loads correctly and the richtext field is rendered as expected. Of course, without the embed image. Then, if I put back the embed tag/element, the inifinite loop is happening again.

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.