Coder Social home page Coder Social logo

terminal42 / contao-leads Goto Github PK

View Code? Open in Web Editor NEW
33.0 11.0 23.0 938 KB

Leads extension for Contao Open Source CMS; Store and manage form data with ease!

License: GNU Lesser General Public License v3.0

PHP 96.95% JavaScript 2.59% SCSS 0.46%
contao

contao-leads's Introduction

terminal42/contao-leads

terminal42/contao-leads is an extension for the Contao CMS.

It allows you to store submissions from the Contao form generator into the database without the need to create tables for each form. Leads can then be viewed in the back end as well as exported into various formats (e.g. CSV or Excel).

If multiple identical forms exist (e.g. in different languages), lead data can be grouped by the main form (e.g. your fallback language). This allows to view and export data as if it was just one form.

Installation

Choose the installation method that matches your workflow!

Installation via Contao Manager

Search for terminal42/contao-leads in the Contao Manager and add it to your installation. Finally, update the packages.

Manual installation

Add a composer dependency for this bundle. Therefore, change in the project root and run the following:

composer require terminal42/contao-leads

Depending on your environment, the command can differ, i.e. starting with php composer.phar … if you do not have composer installed globally.

Configuration

Initial configuration can be done in the form generator of Contao. Do not forget to activate the fields you want to save! In the form configuration, you can set a label for the back end menu link of your leads and define the listing of the form data using simple tokens.

To configure exports, first make sure you have at least one form submission. A global operation to configure exports is then available when viewing the lead data.

Permissions

For users that are not admins of the system, permissions need to be set up to access leads. Enable access to the leads back end module and select the forms of which lead data should be available. If the user does not need to configure the form itself, you don't need to give access to the form generator!

You can additionally configure if a user is allowed to edit or delete existing leads.

Simple Tokens

Contao Simple Tokens are used to generate the back end list and as well as for customized exports. All saved form fields are available by their field name. For example, if you created a text field with name firstname, you can output its value in the back end list or the export using the ##firstname## simple token.

Additionally, the following simple tokens are providing data of the lead itself, rather than the data submitted through the form generator.

##_id##
Database ID of the lead record.
##_created##
Date and time when the lead was saved (when the form was submitted).
##_form
Database ID (and title) of the form that was submitted.
##_member##
ID of the front end member that was logged in while the form was submitted, or 0 if no member was logged in.

License

This bundle is released under the LGPL 3.0+ license

contao-leads's People

Contributors

aschempp avatar de-es avatar fritzmg avatar lbeckx avatar pressi avatar qzminski avatar rabauss 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

contao-leads's Issues

Datumsumwandlung beim Speichern

Hallo,
ist ein Formularfeld als Datum definiert, wird dieses an Hand der Datumsdefinition in der localconfig.php umgewandelt.
In mehrsprachigen Seiten hat man aber unter Umständen unterschiedliche Datumsformate. Damit schlägt die Umwandlung fehl, wenn dies nicht korrekt eingegeben ist.
Spricht etwas dagegen, die Formatdefinition nicht aus der localconfig sondern aus dem Page-Obejkt zu ziehen?

Keine Anzeige der Inhalte bei Anfragen im BE

Contao 3.5.3
leads master 1.5? (Manuell installiert und den Modulordner nach leads umbenannt.)

Im BE habe ich ohne Composer installiert:

  • haste 4.9.0
  • MultiColumnWizard 3.3.3
  • NamespaceClassLoader 1.0.2 (automatisch hinzugefügt)

Ich habe mal das Formular Contact aus der Demo in der DB in einer Tabelle my_form gespeichert. In den Bildern kann man die Einstellungen und die Ausgabe sehen.

Tabelle my_form:
server24 webgo24 de_127 0 0 1_web36_db24_my_form_phpmyadmin_3 4 9_-_2015-09-30_14 23 26

Gespeicherte Datensätze:
server24 webgo24 de_127 0 0 1_web36_db24_my_form_phpmyadmin_3 4 9_-_2015-09-30_14 24 51

BE-Anfragen-Contact:
contact_-contao_open_source_cms_3 5-_2015-09-30_14 20 34

Formulardaten anzeigen:
contact_-contao_open_source_cms_3 5-_2015-09-30_14 21 04

Formular Einstellungen:
formulargenerator_ das_formular_id_5_bearbeiten-contao_open_source_cms_3 5-_2015-09-30_14 22 32

Sollte doch eigentlich gehen, aber warum funktioniert das nicht?

view form data not possible with non-admin users?

I noticed in a Contao installation, that non-admin users are not able to view the form data of a leads entry in the backend ("Formulardaten der Anfrage ID xx anzeigen" in german). When you click on it, it just shows "An error occurred!" in red. The backend users have all rights regarding the leads extension enabled, i.e.:

  • the Backend module
  • the tables tl_lead, tl_lead_data, and tl_lead_export
  • within tl_lead_export all fields

As far as I can see, there are no additional rights I can grant to the user. Is viewing the form data really only possible as an admin right now?

As a workaround the users currently use the information icon right next to the view form data button.

Contao 4: leads not visible in backend

Under Contao 4(.4) the leads are not visible in the backend. I have enabled Store leads and given a Navigation label plus Record label, but the leads will not appear in the left menu pane under "Leads". The leads are stored as expected in the database though. I also tried not using a custom Navigation label, but the leads are still not visible. This was tested with an admin user.

tl_lead_data contains no records

C4.4.7, NC1.4.2, CL1.4.7, mp_forms3.0.4
NC in conjunction with mp_forms works perfect. Additionally I would like to use leads to display the form data in the backend but it only shows the Simple Tokens itselves (except of the ##created## Token).

grafik

In the database, the table tl_lead_data is completely empty, which is probably the reason. This is the first time I use this under C4. Formerly I used leads the same way with C3.5 without problems.

Anything that I need to change with C4 or a bug?

Name of exported file

Could the exported file be named something else then file-1, file-2… ? This could be a custom text name with date for example.

Thanks

lead CSV whiteout filetype

Contao: 3.4.4
leads: latest

After create an export configuration and start an export, leads doesn't add the filetype (CSV) to the filename.
In the same way it doesn't seperate the fields by comma ",".
Have the same bug on multiple installations.

Remove strange drag&drop sorting in leads data

Its possible to select a leads data record and move it via drag
&drop to another position. This may be useless (especially no buttons are visible).

NOTE: Maybe this is a core probleme.

Date / Time not converted in list view

if a form text field input validation is set to date or time, the date or time is stored as Unix Epoch timestamp like 1539122400. Ok so far.

In the list view of leads where the record label has been configures with something like ##date## or ##time## those date/time timestamps are not converted back.
On the other hand it is converted back correctly in the "show details" and in the "show field data" view and looks like [10.10.2018]

Tested with Contao 3.5.31.

creation date will not be exported

I've set up a saving of some form data and I also set up an export konfiguration. There I have the field "Date created" with the settings in the following screenshot. When I click the blue i icon in the data overview I see the "Received" date, but when I export/download the csv with the data, the field of date created is empty. With the option "Export all data" the column of "Date created" is empty, too.

Contao 3.5.9, terminal42/contao-leads 1.2.1
screenshot 2016-04-27 11 13 10

Form duplication leads to incorrect export fields

If a form is duplicated, its leads export configuration is as well. If individual fields export is set up, the field IDs are incorrect because they point to the wrong form. The export configuration (probably serialized array) should be updated if possible…

Add permissions

Currently it is not possible to define which backend group has access to which lead results. We might add this check based on form permissions...

Issue with file upload field

Hi,
Leads works well but it doesn't save file upload data (like the path or url of the file).
The field isn't even displayed in the Leads. And so isn't exported in csv nor xls.
What to do ?
Thanks

Form field label and tl_lead_data label

In my opinion, the function Leads::prepareLabel() should return $objField->label. Otherwise in table tl_lead_data, the fields valueand label has same entry, which is redundant. Or is there another reason for that.

PS: Thanks for introducing to this module. It was hard to find it on my own, as it is not listed in Extension Repo. (May be due to preferred listing on packagist)

Fehler bei Insert in tl_leads

An exception occurred while executing 'INSERT INTO tl_lead ... VALUES ...' String data, right truncated: 1406 Data too long for column 'language'.

Laut Tabellenstruktur ist die Spalte 'language' vom Typ varchar(2). In der INSERT-Anweisung soll in meinem Fall der Wert 'de_DE' eingefügt werden.

No space between attributes

Line 199 in Leads.php results in no space between attributes (...verwalten."style="background...)
https://github.com/terminal42/contao-leads/blob/master/library/Leads/Leads.php#L199

<ul class="tl_level_2">
  <li>
  <a href="contao/main.php?do=lead&master=6" class="navigation leads" title="Anfragen für Formular &quot;Leads-Formular&quot; verwalten."style="background-image:url('system/modules/leads/assets/icon.png')">Leads-Formular</a>
  </li>
</ul>

Possible solution

// -
'icon'      => 'style="background-image:url(\'system/modules/leads/assets/icon.png\')"',
// +
'icon'      => ' style="background-image:url(\'system/modules/leads/assets/icon.png\')"',

XLSX-Export über das Frontend

Ist es möglich, ein Modul einzubauen, mit dem ein vordefinierter Excel-Export (*.xlsx) über das Frontend zum Download angeboten werden kann?
Der Download soll über den Contao-Frontendlogin geschützt werden können.

Beispiel: Anmeldung zu einer Veranstaltung, mehrere Organisatoren der Veranstaltung sollen die Anmeldedaten (bzw. Teile davon - entsprechend dem vorkonfiguriertem XLSX-Export) exportieren können. Sonst müsste für diesen Personenkreis nur für den Export ein stark eingeschränkter Backendzugang eingerichtet werden.

Add a listing/details frontend module

Because we have 2 database tables, the core listing module could not be used to display leads and lead data in frontend. Mmoreover this will be very hard to configure for non tech users.

A special listing module with som filters an da detail view would be fine.

Export: Individueller Export nicht mehr wählbar

Irgendwie ist seit kurzem in den Export-Optionen bei "Individueller Export" nichts mehr wählbar/einstellbar:
image

Da konnte ich vorher jedes einzelne Feld genau definieren.

Tritt das nur bei mir auf oder habt ihr das auch?
Ich habe Contao 4 und Erweiterungen per Composer aktualisiert, wüsste aber nicht, woran es jetzt konkret liegen könnte.

Außerdem stellt sich bei uns die Backend-Sprache (z.T.) einfach mal so auf Englisch um (sodass wir dann einen Denglisch-Sprachmix im Backend haben). Ich habe Leads im Verdacht, kann es aber noch nicht zweifelsfrei bestätigen.

Brackets in labels are converted upon export

We have the label anzahl (variabel) which we would like to use as column header/label.
But when we export, we always get anzahl &#40;variabel&#41;

There is a htmlentities where it should not be :)

Export Error

Hi, we get following error, when trying to export data as csv (tried different forms):

An exception occurred while executing 'SELECT * FROM (
SELECT
tl_lead_data.field_id AS id,
IFNULL(tl_form_field.name, tl_lead_data.name) AS name,
IF(tl_form_field.label IS NULL OR tl_form_field.label='', tl_lead_data.name, tl_form_field.label) AS label,
tl_form_field.type,
tl_form_field.options,
tl_lead_data.field_id,
tl_lead_data.master_id,
tl_lead_data.sorting
FROM tl_lead_data
LEFT JOIN tl_form_field ON tl_form_field.id=tl_lead_data.field_id
LEFT JOIN tl_lead ON tl_lead_data.pid=tl_lead.id
WHERE tl_lead.master_id=15
ORDER BY tl_lead.master_id!=tl_lead.form_id
) result_set
GROUP BY field_id
ORDER BY sorting':

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'result_set.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

Seems to be an issue with MySQL 5.7 and the changed sql_mode, which changes group by interpretation. It can be fixed by changing the group by line to GROUP BY field_id,name, label,master_id, sorting

Information:
MySQL: 5.7.19-0ubuntu0.16.04.1
PHP-Version: 7.1.7
Contao: 4.4.1
Contao-Leads: 1.4.7

export does not work under MySQL 5.7.5+

In the newest MySQL (starting from 5.7.5) and MariaDB versions, the following config is set by default:

sql_mode=only_full_group_by

This causes the following error, when trying to export a lead:

Doctrine\DBAL\Exception\DriverException:
An exception occurred while executing 'SELECT * FROM (
                SELECT
                    tl_lead_data.field_id AS id,
                    IFNULL(tl_form_field.name, tl_lead_data.name) AS name,
                    IF(tl_form_field.label IS NULL OR tl_form_field.label='', tl_lead_data.name, tl_form_field.label) AS label,
                    tl_form_field.type,
                    tl_form_field.options,
                    tl_lead_data.field_id,
                    tl_lead_data.master_id,
                    tl_lead_data.sorting
                FROM tl_lead_data
                LEFT JOIN tl_form_field ON tl_form_field.id=tl_lead_data.field_id
                LEFT JOIN tl_lead ON tl_lead_data.pid=tl_lead.id
                WHERE tl_lead.master_id=2 AND tl_lead_data.field_id IN (0,14,16,19,22,26,40,43,41,44,46)
                ORDER BY tl_lead.master_id!=tl_lead.form_id
            ) result_set
            GROUP BY field_id
            ORDER BY FIND_IN_SET(field_id, '0,14,16,19,22,26,40,43,41,44,46')':

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'result_set.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:121
  at Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('…', object(PDOException))
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:176)
  at Doctrine\DBAL\DBALException::wrapException(object(Driver), object(PDOException), '…')
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:150)
  at Doctrine\DBAL\DBALException::driverExceptionDuringQuery(object(Driver), object(PDOException), '…')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:284)
  at Contao\Database\Statement->query()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:257)
  at Contao\Database\Statement->execute(2)
     (vendor/terminal42/contao-leads/library/Leads/DataCollector.php:218)
  at Leads\DataCollector->getFieldsData()
     (vendor/terminal42/contao-leads/library/Leads/DataCollector.php:290)
  at Leads\DataCollector->getHeaderFields()
     (vendor/terminal42/contao-leads/library/Leads/Exporter/AbstractExporter.php:113)
  at Leads\Exporter\AbstractExporter->prepareDefaultHeaderFields(object(Result), object(DataCollector))
     (vendor/terminal42/contao-leads/library/Leads/Exporter/Csv.php:49)
  at Leads\Exporter\Csv->export(object(Result), null)
     (vendor/terminal42/contao-leads/library/Leads/Leads.php:361)
  at Leads\Leads::export('1', null)
     (vendor/terminal42/contao-leads/dca/tl_lead.php:494)
  at tl_lead->exportAndCatchExceptions('1', null)
     (vendor/terminal42/contao-leads/dca/tl_lead.php:362)
  at tl_lead->export(object(DC_Table))
     (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:437)
  at Contao\Backend->getBackendModule('lead', null)
     (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:131)
  at Contao\BackendMain->run()
     (vendor/contao/core-bundle/src/Controller/BackendController.php:55)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
  at call_user_func_array(array(object(BackendController), 'mainAction'), array())
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:153)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:171)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app_dev.php:62)

It appears the contao/newsletter-bundle has the same problem: https://community.contao.org/de/showthread.php?68265-Newletter-Versand-schlägt-fehl

See https://stackoverflow.com/a/38551525/374996

Last few questions

Hi Andreas and/or Yanick,

I'm sorry if I'm annoying you with my questions. Leads seems to be the right module to solve my multilingual form problem but I'm experiencing some issues I'm not able to solve by myself. Could you help me with ?

  1. When exporting select fields' datas, I get label data and value data (like : red (yes) ). What file to modify to have only value data ?
  2. CSV or XLS exports work well but custom export only export fields labels (no data).
  3. Is it possible to change the name of exported file from file-##.csv to custom-text-date-time.csv ?
    Thanks for your answers.
    JLBA

PS : did you receive the french translation package I've sent some days ago ?

conditional export options

It would be useful to also be able to create export configurations with conditional elements. e.g. where you could define that you want to export all records where a specific field has a specific string (etc.).

Fatal Error Allowed memory size ... exhausted

Moin zusammen,

ich habe gestern festgestellt, dass das schon früher aufgetauchte Allowed memory size ... exhausted Problem scheinbar dann ausgelöst wird, wenn in einem der SimpleTokens ein Bindestrich verwendet wird. Dabei ist es egal, ob es ein entsprechendes Formularfeld gibt oder nicht.

Wenn ich also im Formulargenerator in der "DatensatzBezeichnung" z.B. ##test-test## eingebe und anschließend die zu dem Formular gehörenden Anfragen öffnen möchte, wird der Fehler ausgegeben.

Fatal Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 65484 bytes) in .../system/modules/core/library/Contao/Config.php on line 50

Die Fehlermeldung hatte ich übrigens auch beim Versenden von Formulardaten mit dem Notification Center, bin mir aber nicht sicher, ob das mit dem Bindestrich zusammen hängt und das ist auch schon einige Zeit her.

Außerdem ist mir aufgefallen, dass es eine weitere Fehlermeldung gibt, wenn man in der Auflistung der Anfragen auf das blaue i-Icon klickt. Dann erscheint in einer Lightbox folgende Meldung dreimal unterneinaner:

Warning: include(/var/www/vhosts/tbv.intrahosting.xyz/httpdocs/system/modules/leads/templates/be_leads_show.html5): failed to open stream: No such file or directory in system/modules/core/library/Contao/BaseTemplate.php on line 88
#0 system/modules/core/library/Contao/BaseTemplate.php(88): __error(2, 'include(/var/ww...', '/var/www/vhosts...', 88, Array)
#1 system/modules/core/library/Contao/BaseTemplate.php(88): Contao\BaseTemplate::parse()
#2 system/modules/core/library/Contao/Template.php(277): Contao\BaseTemplate->parse()
#3 system/modules/core/classes/BackendTemplate.php(34): Contao\Template->parse()
#4 system/cache/dca/tl_lead.php(342): Contao\BackendTemplate->parse()
#5 system/modules/core/classes/Backend.php(430): tl_lead->show(Object(Contao\DC_Table))
#6 system/modules/core/controllers/BackendMain.php(131): Contao\Backend->getBackendModule('lead')
#7 contao/main.php(20): Contao\BackendMain->run()
#8 {main}

Vielen Dank und viele Grüße
Timo Mackowiak

Offer a possibility to export the data cron- or time-based

Hi is it possible to add a function that one can export the data at certain time periods via an adjustable cron job or something similar?

Example:
I have to provide an export file with formular data every night at 00:00 o'clock for a client, so that he is then able to continue processing the exported data in his system.

OutOfBoundsException due to Typo

If you set "time" as rgxp for a form field, you'll get an OutOfBoundsException because the \Contao\Date Class Constructor is beeing called without a format (null).
The reason is a Typo in the prepareValue-Method inside the \Leads\Leads-Class in Line 46.

Here's a snippet of the current Code (Lines 42-48):

// Convert date formats into timestamps
if ($varValue != '' && in_array($objField->rgxp, array('date', 'time', 'datim'))) {
    $key      = $objField->rgxp . 'Format';
    $format   = isset($GLOBALS['objPage']) ? $GLOBALS['objPage']->{$key} : $GLOBALS['TL_CONFIG'][$key];
    $objDate  = new \Date($varValue, $GLOBALS['TL_CONFIG'][$format]);
    $varValue = $objDate->tstamp;
}

And here is my Correction for the Bug:

// Convert date formats into timestamps
if ($varValue != '' && in_array($objField->rgxp, array('date', 'time', 'datim'))) {
    $key      = $objField->rgxp . 'Format';
    $format   = isset($GLOBALS['objPage']) ? $GLOBALS['objPage']->{$key} : $GLOBALS['TL_CONFIG'][$key];
    $objDate  = new \Date($varValue, $format);
    $varValue = $objDate->tstamp;
}

BE : Error when trying to export in csv or in excel

In Contao 2.11.12, here is the message I got when trying to expert in csv, xls or expert choice.

Fatal error: Could not load class CsvWriter in …/system/functions.php on line 105
#0 [internal function]: __error(256, 'Could not load ...', '/Applications/M...', 105, Array)
#1 …/system/functions.php(105): trigger_error('Could not load ...', 256)
#2 …/system/modules/contao-leads-develop/Leads.php(298): __autoload('CsvWriter')
#3 …/system/modules/contao-leads-develop/dca/tl_lead.php(263): Leads->export('14', 'excel')
#4 …/system/modules/backend/Backend.php(246): tl_lead->export(Object(DC_Table), 'tl_lead', Array)
#5 …/contao/main.php(120): Backend->getBackendModule('lead')
#6 …/contao/main.php(230): Main->run()
#7 {main}

Do not convert dates to timestamps

Consider the following example and reproduction:

  1. Set the timezone of your Contao Installation to CET in the system settings.
  2. Create a form with a text input field named birthday.
  3. Set the validation of the text field to Date.
  4. Configure the form and field to be saved into a lead.
  5. Submit the form with the date 1980-09-27 for example.
  6. Look at the leads entry in the back end, it will display [1980-09-27] as the value.
  7. Set the timezone of your Contao Installation to GMT in the system settings.
  8. Look at the leads entry in the back end, it will display [1980-09-26] as the value.

Contao Leads makes the assumption that a date field is automatically a timezone-transformable moment in time and thus transforms it to a timestamp. But clearly, birthdays for example should never be adjusted to a timezone, thus it makes no sense to save birthdays as timestamps.

Installation of version 1.4.10 in Contao 4.4.16 fails

Having a freshly installed Contao 4.4.16 (installed via the Contao Manager) I cannot successfully install contao-leads (current version 1.4.10) today.

The installation is failing like this:


Using version ^1.4 for terminal42/contao-leads
/home/contao44-3/public_html/composer.json has been updated
Loading composer repositories with package information
Updating dependencies
Package operations: 4 installs, 0 updates, 0 removals
  - Installing contao-community-alliance/composer-plugin (3.0.8): Downloading (100%)
  - Installing menatwork/contao-multicolumnwizard (3.3.16): Downloading (100%)
  - Installing codefog/contao-haste (4.19.0): Downloading (100%)
  - Installing terminal42/contao-leads (1.4.10): Downloading (100%)
Writing lock file
Generating optimized autoload files
> Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication
In ContaoModuleBundle.php line 36:
                                                                   
  The module folder "system/modules/contao-leads" does not exist.  
                                                                   
Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-update-cmd event terminated with an exception
--------------------------------------------------------
Exception occured: An error occurred while executing the "contao:install-web-dir" command: 
In ContaoModuleBundle.php line 36:
                                                                   
  The module folder "system/modules/contao-leads" does not exist.  
[...]

Indeed, the symlink in the system/modules directory is only named "leads", although pointing to a module directory named "contao-leads" in the vendor directory structure:
lrwxrwxrwx 1 contao44-3 contao44-3 36 Apr 3 13:58 leads -> ../../vendor/terminal42/contao-leads

I successfully installed the module (same version!) into a Contao 4.4.14 installation last week, but cannot understand the reason for this error (probably due to lack of deeper understanding of Symfony etc.).

OutOfBoundsException

Hi,
Wenn man ein Textfeld anlegt und es auf den Eingabewert "Datum" überprüft, "In Anfrage speichern" auf "ja" setzt, es speichert, und anschließend den Feldtyp von "Textfeld"auf z.B. "Select-Menü" ändert, bleibt die Eingabeüberprüfung weiterhin bestehen und es kommt im Frontend beim Absenden des Formulars zu einem OutOfBoundsException Fehler.

Sobald man "In Anfrage speichern" auf "Nein" setzt, geht es ohne Problem durch.

Hier die ganze Meldung:
Fatal error: Uncaught exception OutOfBoundsException with message Invalid date "test" thrown in system/modules/core/library/Contao/Date.php on line 438
#0 system/modules/core/library/Contao/Date.php(79): Contao\Date->dateToUnix()
#1 composer/vendor/terminal42/contao-leads/library/Leads/Leads.php(44): Contao\Date->__construct('test', 'd.m.Y')
#2 composer/vendor/terminal42/contao-leads/library/Leads/Leads.php(251): Leads\Leads::prepareValue('test', Object(Contao\Database\Mysql\Result))
#3 system/modules/core/forms/Form.php(544): Leads\Leads->processFormData(Array, Array, Array, Array, Object(Contao\Form))
#4 system/modules/core/forms/Form.php(255): Contao\Form->processFormData(Array, Array, Array)
#5 system/modules/core/classes/Hybrid.php(239): Contao\Form->compile()
#6 system/modules/core/forms/Form.php(90): Contao\Hybrid->generate()
#7 system/modules/core/library/Contao/Controller.php(484): Contao\Form->generate()
#8 system/modules/core/modules/ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#9 system/modules/core/modules/Module.php(287): Contao\ModuleArticle->compile()
#10 system/modules/core/modules/ModuleArticle.php(67): Contao\Module->generate()
#11 system/modules/core/library/Contao/Controller.php(417): Contao\ModuleArticle->generate(false)
#12 system/modules/core/library/Contao/Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#13 system/modules/core/pages/PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')
#14 system/modules/core/controllers/FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#15 index.php(20): Contao\FrontendIndex->run()
#16 {main}

Manual installation produces error

Hello,

today I have tried to install your extension manually because I don´t use composer. Unfortunately, as I was trying to update the database it appeared an error. Before I had deleted the cache.

Warning: in_array() expects parameter 2 to be array, null given in system/modules/core/library/Contao/System.php on line 160
#0 [internal function]: __error(2, 'in_array() expe…', '/homepages/46/d…', 160, Array)
#1 system/modules/core/library/Contao/System.php(160): in_array('getInstance', NULL)
#2 system/modules/core/library/Contao/System.php(340): Contao\System::importStatic('Leads\\Leads')
#3 system/modules/core/controllers/BackendInstall.php(43): Contao\System::loadLanguageFile('default')
#4 contao/install.php(23): Contao\BackendInstall->__construct()
#5 {main}

Fatal error: Class 'Leads\Leads' not found in /homepages/46/d570078274/htdocs/system/modules/core/library/Contao/System.php on line 160

How can I fix it?

French translation

Hello,

I've released a first french translation for Leads. I just miss :

  • an exact definition of leads (conduit ?) to translate it correctly ;
  • the possibility to translate 'Dies ist ein Master-Formular" ; I've found it in the dca/tl_form.php but not in the languages files.

How can I send you the .zip file ?

Contao backend slows down with any click

Hi,

first let me say thank you for this great module!!!

I have a project with about 40 Leads. This slows down the whole Contao backend because of this complex database query from system/modules/leads/Library/Leads/Leads.php:

query] => SELECT f.id, f.title, IF(f.leadMenuLabel='', f.title, f.leadMenuLabel) AS leadMenuLabel
FROM tl_form f
LEFT JOIN tl_lead l ON l.master_id=f.id
WHERE leadEnabled='1' AND leadMaster=0
UNION
SELECT l.master_id AS id, IFNULL(f.title, CONCAT('ID ', l.master_id)) AS title, IFNULL(IF(f.leadMenuLabel='', f.title, f.leadMenuLabel), CONCAT('ID ', l.master_id)) AS leadMenuLabel
FROM tl_lead l
LEFT JOIN tl_form f ON l.master_id=f.id
WHERE ISNULL(f.id)
ORDER BY leadMenuLabel
[explain] => Array
(
[id] => 1
[select_type] => PRIMARY
[table] => f
[type] => ALL
[possible_keys] =>
[key] =>
[key_len] =>
[ref] =>
[rows] => 37
[Extra] => Using where
)

                [returned] => 40 row(s) returned
                [duration] => 33.022,939 ms !!!!!!!!!!!!!!!!!!!!

This query "only" generates the list of Leads in order to make it clickable in the Contao backend (wich is at last useful) . But every click in the contao backend causes this query again without caching and this slows down the backend and frontend while database is under heavy work.

Is there a possibility to fix this issue?

Thanks a lot

Oliver

configurable CSV export

If you use a German regional setting in your (Windows) OS for example, Microsoft Excel (Windows) cannot properly open CSV files directly. With German regional settings it expects the delimiter to be ;, since the decimal point with German regional settings is ,. Furthermore Microsoft Excel (Windows) needs the Byte Order Mark for UTF-8 support.

So further CSV export options could be:

  • delimiter (, by default)
  • decimal point (for number_format, may be changed automatically according to the delimiter)
  • add Byte Order Mark

See these test files for example: csv_test.zip

Screenshots in Microsoft Excel 2016 (Windows):

without_bom with_bom

What is "Record label" made for ?

Hello,

I'm just testing contao-leads but I don't understand what to do with the mandatory "Record label". What is a label format ? What are tokens ?

Thanks.

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.