Git Product home page Git Product logo

netgeninformationcollectionbundle's Introduction

Build Status Code Coverage Quality Score Downloads Latest stable License

The information collection feature makes it possible to gather user input when a node referencing an information collector object is viewed. It is typically useful when it comes to the creation of feedback forms, polls, etc.

An object can collect information if at least one of the class attributes is marked as an information collector. When the object is viewed, each collector attribute will be displayed using the chosen datatype's data collector template. Instead of just outputting the attributes' contents, the collector templates provide interfaces for data input. The generated input interface depends on the datatype that represents the attribute. ( From eZ documentation).

This bundle reimplements information collection feature in eZ Platform/Ibexa stack.

License, docs and installation instructions

License

Installation instructions

Upgrade instructions

Documentation

Changelog

netgeninformationcollectionbundle's People

Contributors

emodric avatar iherak avatar jbcr avatar jeremycr avatar leohajder avatar ljudevit avatar marioblazek avatar

Stargazers

 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

netgeninformationcollectionbundle's Issues

Sending attachments

Implemented a way to send attachments inside EmailAction. There should be a option in configuration to disable/enable sending attachments per content type.

Different twig templates for different custom email actions

Hi,

it would be great to have custom email actions use different templates from the default one.

Something like:

netgen_information_collection:
    system:
        default:
            action_config:
                email:
                    templates:
                        default: "Bundle:email.html.twig"
                        actions:
                               email:
                                     content_types:
                                            contact_us "email:contact_us.html.twig"
                                            work_with_us: "email:work_with_us.html.twig"
                               email_to_sender:
                                     content_types:
                                            contact_us: "email:contact_us2.html.twig"
                                            work_with_us: "email:work_with_us2.html.twig"
                    default_variables:
                        sender: ""
                        recipient: ""
            actions:
                default:
                    - email
                    - database
                    - email_to_sender

Mail is not sent, collected info doesn't show up

eZPlatform Version 2.4

I followed the documentation, the form is displayed and I can send it. Seemingly successful, at least I get the success message.
I use a seperate template for email:
email: templates: default: "email/form_collect_data.html.twig"

which only contains the email block and a sample text:
{% block email %} New mail received through example.de website! {% endblock %}

In the app/config/ezplatform.yml file I configured to execute both 'email' and 'database' as default actions.
The default_variables all contain valid values of course.

Maybe some configurations are missing? Unfortunately I couldn't find any further configs for sending mails or saving the collected data of the form fields.

I expected that in the admin panel a new tab is showing up as soon as there is data collected the first time.

Any Ideas on what is wrong or missing?

Is it work for non-enterprise version?

I am playing the eZplatform in my spare time to see how it works. I realize that there is no built-in Informaiton Colletion field, and found your bundle. However, I have followed the instructions to install it and can't get it to work so that I can mark a field type as information collector.

I have tried many times and different versions of ezplatform, but not the enterprise version. I have see any errors from composer. I installed a new fresh clean installation.

Registered the bundle
updated the routing config
update the system config for actions
cleared the cache

But I can't see any changes in the administrative interface. Am I missing something?

Looking forward to hearing from you.

Use alias from service definition rather than hard coded name

Current service definition

tags:
    - { name: netgen_information_collection.action }

and getName() method must be implemented

public function getName()
    {
        return 'email';
    }

Better solution is to add alias to service definition:

tags:
    - { name: netgen_information_collection.action, alias: email }

Enable seamless adding of collected info classes & objects

Currently, every class that collects info needs to have a config counterpart, which seriously hinders editors ability to add forms on the fly.

It would be great to provide a (configurable) default actions config which would be used for all classes that do not have specific config.

Error on admin route when creator of infocollection has been deleted

When accessing the collected info backend (/admin/netgen/informationcollection/collection-list/[contentId]) for a content where an infocollection exists that has been created by a user that no longer exists, there will be an error.

Currently this is can only be fixed by manually updating the creator_id of the infocollection (directly in the database) to an existing user's id.

Add optional Fields CC, BCC and ContentType to informationcollector class

It would be good to have CC, BCC + contenttype (text/html or text/plain) as an option for the informationcollection content classes. So the infocollectionmails can be controlled by the configuration of the contentobject in the backend.

Optional CC & BCC email field are very usefull.

contentype text/html or text/plain is sometimes used for technical mails - a form is send to an other technical system as plain/text version

We have already a patch for the infocollection bundle 1.9 i attached as a tar.gz.

vendor/netgen/information-collection-bundle/bundle/Mailer/Mailer.php
vendor/netgen/information-collection-bundle/bundle/Factory/AutoResponderDataFactory.php
vendor/netgen/information-collection-bundle/bundle/Factory/EmailDataFactory.php
vendor/netgen/information-collection-bundle/bundle/DependencyInjection/ConfigurationConstants.php
vendor/netgen/information-collection-bundle/bundle/DependencyInjection/Configuration.php
vendor/netgen/information-collection-bundle/bundle/Value/EmailData.php
vendor/netgen/information-collection-bundle/bundle/Constants.php

information-collection-bundle_1.9_cc_bcc_contentype_patch.tar.gz

hopefully you can add these functionality to your bundle

I see you are refactoring your extension at the moment - maybe you could add these function, too.

Thank's

Provide option to render Recaptcha as a form type

Currently, form error related to recaptcha validation is bound to the form itself, making it impossible to display the error right next to the recaptcha widget (if checkbox widget is used, for example).

In addition to having the option to bind the error message to the form, it would be nice to have a dedicated form type which can be used to render the recaptcha widget, which would enable error message to be bound to the form field itself instead of the entire form.

Checkbox value always "No" in Collected Information menu

Hello.
It seems like that from Setup -> Collected Information -> Collections menu, the checkbox value type is taken from the "data_int" column and not "data_text".

image
schermata 2017-08-23 alle 17 54 43

In fact, if I try to set data_int to 1 and even leaving the data_text empty, backend page shows "Yes".
image
image

Infocollection admin interface is incompatible with MySQL 5.7+

When trying to access the infocollection admin interface on a server with MySQL 5.7+ installed there will be a fatal error:

An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT eco.id AS content_id, eco.name, ecot.main_node_id, ecc.serialized_name_list, ecc.identifier AS class_identifier FROM ezcontentobjecteco LEFT JOINezcontentobject_treeecot ONeco.id=ecot.contentobject_idINNER JOINezcontentclassecc ONeco.contentclass_id=ecc.idWHERE (ecc.version = 0) AND (eco.id IN (637, 1414, 1563)) GROUP BYecot.main_node_id LIMIT 10'

This is caused by MySQL's only_full_group_by mode being turned on as explained in this issue on Stackoverflow.

It can be fixed by aggregating the selected columns in the corresponding controller instead of only selecting the values which would produce unpredictable results.

Using the max aggregation function on all selected fields should be ok in this case because the column's values will always be the same for all rows matched by the group by clause.

Hyphens in parameter placeholder names break the query on Mysql 8

For example:

public function findByCollectionId($collectionId)
{
    $qb = $this->createQueryBuilder('eica');

    return $qb->select('eica')
        ->where('eica.informationCollectionId = :collection-id')
        ->setParameter('collection-id', $collectionId)
        ->getQuery()
        ->getResult();
}

throws a following error:

[Semantical Error] line 0, col 146 near 'id': Error: 'id' is not defined.

This was first noticed in setup using Mysql 8 with default configuration, PHP, Symfony and Doctrine versions match some of the previous projects where the issue was not occuring. The only difference is Mysql 8 being used instead of Mysql 5.7

Course of action: replace all placeholder names in all of the queries with camel case format

Error present in both 1.x and master/2.x versions

Can't edit multilingual content in backend.

Hi, I have 3 fields marked as required and marked as infocollectors. When I try to edit the content I am forced to enter the required fields as wall although they are infocollectors. After submission I get the following error:
{
"ErrorMessage": {
"_media-type": "application/vnd.ez.api.ErrorMessage+json",
"errorCode": 400,
"errorMessage": "Bad Request",
"errorDescription": "Content fields did not validate",
"errorDetails": {
"fields": [
{
"_fieldTypeId": 462,
"errors": [
{
"type": "empty",
"message": "Value for required field definition 'form_name' with language 'eng-GB' is empty"
}
]
},
{
"_fieldTypeId": 463,
"errors": [
{
"type": "empty",
"message": "Value for required field definition 'form_vorname' with language 'eng-GB' is empty"
}
]
},
{
"_fieldTypeId": 471,
"errors": [
{
"type": "empty",
"message": "Value for required field definition 'nachricht' with language 'eng-GB' is empty"
}
]
}
]
},
"trace": "#0 /var/www/disk2/hussl/vendor/ezsystems/platform-ui-bundle/Controller/Rest/ContentController.php(92): eZ\Publish\Core\REST\Server\Controller\Content->updateVersion('91', '8', Object(Symfony\Component\HttpFoundation\Request))\n#1 [internal function]: EzSystems\PlatformUIBundle\Controller\Rest\ContentController->updateVersion('91', '8', Object(Symfony\Component\HttpFoundation\Request))\n#2 /var/www/disk2/hussl/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(144): call_user_func_array(Array, Array)\n#3 /var/www/disk2/hussl/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)\n#4 /var/www/disk2/hussl/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php(69): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#5 /var/www/disk2/hussl/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(185): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#6 /var/www/disk2/hussl/web/app.php(70): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))\n#7 {main}",
"file": "/var/www/disk2/hussl/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/Content.php",
"line": 469
}
}

I am using the following latest packages:

v1.3.0 (30.03.17 16:15, 78dfd)
ezsystems/content-on-the-fly-prototype
v0.1.11 (24.07.17 16:26, 14f95)
ezsystems/ez-support-tools
v0.1.2 (23.11.16 14:30, 0eb66)
ezsystems/ezplatform-design-engine
v1.0.1 (27.07.17 17:11, ac1c5)
ezsystems/ezplatform-http-cache
v0.1.1 (28.03.17 13:34, a107c)
ezsystems/ezplatform-multi-file-upload
v0.1.2 (12.06.17 10:20, a6c07)
ezsystems/ezplatform-solr-search-engine
v1.4.2 (16.08.17 17:18, a46cb)
ezsystems/ezpublish-kernel
v6.11.1 (23.08.17 21:06, 25008)
ezsystems/platform-ui-assets-bundle
v3.3.0 (08.08.17 11:45, d4b96)
ezsystems/platform-ui-bundle
v1.11.0 (09.08.17 12:42, aa4ec)
ezsystems/repository-forms
v1.9.0.1 (28.08.17 22:37, 45f31)

wrong timestamp / date showing in /informationcollection/collection-list/

I have test infocollector in mediasite 3.0 setup

  • i found out that the date disabled in the backend is -9 hour from my current timestamp

To test it. Sign a form go to backend adminui/netgen/informationcollection/collection-list/672 have a look to the time

than yo create a new container object in media and have a look to the displayed time.

The time of the object is correctly shown in my current time.
The time in infocollector is shown -9 hours of my current time.

Semantic configuration for email templates

It would be great to have a semantic configuration for email templates, so we don't have to override the config by using container params.

As an alternative, consider using eZ Publish view layer, so you can render the template simply by rendering a sub controller, as was done in eZ Publish legacy with collectedinfo and collectedinfomail view types.

Remove action keyword when configuring actions

Currently configuration looks like this:

ng_feedback_form:
    - action: email
    - action: database

it would be better to have something like this:

ng_feedback_form:
    actions:
        - email
        - database

Compatibility issue with eZ 5.4

1.6 release introduced breaking change. Installation on eZ 5 sites breaks with this error:

PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\UndefinedMethodException: Attempted to call an undefined method named "arrayPrototype" of class "Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition".

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.