netgen / netgeninformationcollectionbundle Goto Github PK
View Code? Open in Web Editor NEWInformation collection alike feature for eZ Publish 5/eZ Platform
Home Page: https://netgen.io
License: GNU General Public License v2.0
Information collection alike feature for eZ Publish 5/eZ Platform
Home Page: https://netgen.io
License: GNU General Public License v2.0
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.
Write tests for Dependency Injection based on https://github.com/matthiasnoback/SymfonyDependencyInjectionTest.
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?
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
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.
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)
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
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 }
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.
For all Field values method toString()
should be used.
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.
Implemented a way to send attachments inside EmailAction
. There should be a option in configuration to disable/enable sending attachments per content type.
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
Introduce custom translation domain in forms builder.
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 JOIN
ezcontentobject_treeecot ON
eco.
id=
ecot.
contentobject_idINNER JOIN
ezcontentclassecc ON
eco.
contentclass_id=
ecc.
idWHERE (ecc.version = 0) AND (eco.id IN (637, 1414, 1563)) GROUP BY
ecot.
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 select
ing the values which would produce unpredictable results.
Using the max
aggregation function on all select
ed 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.
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".
I have test infocollector in mediasite 3.0 setup
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.
Enable option to handle Field with custom logic when toString()
method is not enough.
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.
Write tests for Bundle configuration based on https://github.com/matthiasnoback/SymfonyConfigTest.
The template located at https://github.com/netgen/NetgenInformationCollectionBundle/blob/master/Resources/views/email/email.html.twig is probably extraneous, the logic inside the template could be done inside the email action.
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
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.