Typo3 Powermail: Export of multiple forms not working - How to add Translations - typo3

I have a contact form in different languages. All Forms (1 per language) store their data on a certain page. When I click "Mails" and that storage page, I see a list of all messages from all forms - so far so good.
But when I click CSV Export, I only get the data from one language. After a while of debugging I think I have found the reason - this is because the export service collects the fields from the first message and based on that field list it builds all the other rows. As other messages are from different forms (i.e. languages) there are no corresponding fields for those messages and they are not exported.
Have a look at https://github.com/Intera/typo3-extension-powermail/blob/master/Classes/Domain/Service/ExportService.php --> see function getDefaultFieldListFromFirstMail
Now I am writing to SO instead of Github Bugs, because I still think that there is something wrong with my setup, as Powermail is quite widely used and such an error would have been reported earlier.

The problem was the way I set up the translations of the Powermail forms. I have created a different form for each language, which is not the correct way to do it.
I have found a video which describes the correct process: https://vimeo.com/268654409 .
In the case that the video gets removed, here are some screenshots:
1.) navigate to "LIST" on the the page of your form, select your form and click "Create new Record".
2.) Add a new record "Alternative Page Language"
3.) Select the desired language for the new record and name it properly:
4.) Now you should have a new localization in your powermail fields:
Click on that localization entry to edit / translate it.

Related

How can i edit an existing Typo3 Extension (Backend Configuration Page)?

i want to edit an existing Typo3 Backend configuration page.
I want to edit a configuration page like this here:
Where can i edit the extensions backend?
To be more clear: where can i change the edit page that an editor can use to change content.
Can someone give me a hint to the right directory or file in generall?
I'm using Typo3-7.6
Thanks
Sorry, can't manage to put all questions in an unformatted comment.
there are a lot of questions, as you are not clear what you want. Maybe that is a problem of the correct words, the vocabluary, but in TYPO3 we have some fix terms for specific object. And I think you do not handle these terms according to the TYPO3 community.
let's define some terms:
first the concept of TYPO3:
all data is stored in record of differnt database tables. All records are organized with some fields and teh main field is uid, the unique ID.
the main table is pages according to the folders of your disk. those folders can contain other records (like files). (nearly) each record in TYPO3 has a relation to a pagesrecord ina field named pid. even pagesrecords have this field and so they build a tree of pages and subpages.
There is one special page, which is no real page: the page with the ' uid' zero. As there is no real pagesrecord with the uidzero, there are other records with are stored in that page by having a pid zero. for example the start of your page tree is anchored in page zero, or global records like languages, user, storages.
Aside of being the anchor to other records, the pagesrecords have information themself. (page name, kind of page, a teaser image, SEO-information, visibility, accessibility, ...)
your screenshot looks like a content record (normaly in the table tt_content), in the lower right corner there you can see the table name and the uidthe the currently edited record.
'Backend': with backend we name the view to the data where an editor can change the content of the website. The real website is the frontend. This can be seen by everyone without the need to login in the backend (you might have access-restriccted areas of your website which need a login, but that still is 'frontend' as there is no option to edit content.
in the backend the editor might be restricted what he can access and what he can modify. An adminuser has no restriction (up until version 9 where the role of a maintainer occured to manage more general and basic options)
so we have not a single 'backend configuration page' but multiple places where we could configure special aspects of the website.
also there is no special 'extension backend'. we have global extension configuration and records belonging to an extension. (And an extension can enhance existing records with additional fields.)
Please be more specific what you want to change

laravel backpack - creating related models on the fly

is it possible to have a onepage-form for editing or creating a entry and its related (1 to n) entrys?
For example: I have a customer model, every customer can have unlimited addresses. I could now have a CustomerCrudController and a AdressCrudController with the adress having select2-field for the customer, maybe having some kind of filter for the customer in the adress-list-view but it would be a more fluid working having the ability to change or add adresses in the customers-edit-view.
Thanks
Christin
There is currently no built-in way to do that right now in a Backpack CRUD create/edit form. It's planned, but will not be happening until the next version of Backpack, which might take as long as 3-6 months to launch.
What you could do is:
1) create your own custom field type, say "select_or_create_address";
2) start from the select2 field type and create your custom functionality:
the results should could be loaded with ajax;
a button next to the select could open a popup with the create address form, either:
a quick form you code yourself that inserts a new address in the db;
the AddressCrudController create form (but without the menu, sidebar, etc); for this you'd need to create another method in the AddressCrudController, base off CrudController::create() but loading a different view;
when the address successfully added, the id should be inserted in the select2 as a value;
My recommendation is to go with the quick form, it should be faster to develop and you wouldn't have to resort to solutions like iFrame popups.
Cheers!

Symfony: unique options in embedded form collection

I have an embedded form collection in Symfony. Which is working nice. I am working with a manytomany assocation mapping.
Except i want to create (with javascript?) the form so that only unique values are available. In my example i have an Organisation which can exist of many users. When i add user "L" in this case and i want to add a second user i want to prevent that user "L" is available in the other dropdown.
The way i embedded the collection of forms is exactly like the documentation of Symfony has learned me. (http://symfony.com/doc/current/cookbook/form/form_collections.html)
Down below is an example of how it works now (in this example I want to prevent that in the dropdown the user "L" is available as an option.
Thank you very much!
Unfortunately, there's no way you can make the HTML form behave this way. HTML forms just do not have any composite (or dependent) <select> widgets. So, the right way to go here would be:
validating the form server-side, so that duplicate values in two select boxes are not allowed;
adding some JavaScript code to the view that renders form. Perhaps this code should listen to <select>s' onChange events, and once an event is received, the option selected in the first box should either receive a disabled attribute or get deleted.

How to track checkboxes with Django and endless pagination?

I am a Django noob and have a situation that goes beyond the basic documentation, etc.
I am updating an ordering webpage that has a form structured as follows:
several text boxes, etc to gather general info (name, date, etc)
two separate tables for selecting (via checkbox) catalogs that are generated/managed using endless_pagination. Each table can have thousands of records, hence the endless_pagination. The first column in each table is a checkbox with value = catalog.id.
a textbox where the user can manually enter catalog IDs
a submit button
I am not sure how to keep track of what a user has selected in the two paginated tables since the checked boxes are lost when choosing a different page. Also, when the user flips back and forth between the pages, the previoulsy checked catalogs will need to be re-checked(since the checked state is not maintained). I am also not sure which tool(s) to use to deal with this.
My thought is to use JavaScript (with which I have minimal experience) to update a list of catalog IDs whenever a checkbox is checked/unchecked and:
- and attach that list to the form or
- update a variable in the form or
- send as a variable separate from the form, whichever is possible/makes more sense.
I'm hoping that maintaining a list of catalog IDs is possible because the next iteration of this form will likely include some sort of filtering so I'm trying to devise a solution that will not have to be reworked later.
I have reviewed a lot of posts but I believe the closest solutions are rendered useless because of the endless_pagination.
Let me know if further clarification is required. Thanks in advance for any suggestions.
UPDATE
I tried using JavaScript to store the catalog IDs in an array when a checkbox is checked. This does not work when a user selects another page in the pagination. The array of checked catalog IDs is lost when the page 'reloads'.
I'm running into this problem right now as well. I'm handling this by writing the checked items to localStorage so they carry across to page 2, 3, etc.. as well as show up as already checked when you go back to page 1. Then every time the page loads, either find and check the existing checkbox, or create a hidden input with the appropriate name and value and append it to the main form.
var selected_items = []
function add_item_to_checkbox(item) {
localStorage.setItem('selected_items', JSON.stringify(selected_items));
checkbox.on("click", add_item_to_checkbox);
bahh... Just look at my jsfiddle it's easier to read and yeah. I don't have to type JS into a textarea on stackoverflow.
Here is my javascript minus a few things that are specific to my code. I'm sure it could be improved upon but it works really well for my application.

Programmatically creating menu hierarchy in Joomla

Let's say that I have a vast quantity of restaurant reviews in a database -- not Joomla articles, just database tables. I want to display these restaurant reviews as part of a Joomla 1.5 web site.
I can write a component to display each review. That part is fine. But rather than listing the reviews as a list on a page, I want to use the nice cascading menu that is part of the Joomla template that the site uses. But I don't want to have to add menu items one by one for each review; I want menu items to be generated automatically from the database contents. The menu of reviews should 'plug in' the existing menu structure for the web site (i.e., I want to supply the code that generates the menu items with an existing menu item so that it generates itself under that item).
How can I create code to programmatically create that menu? Component, plug-in, module, ...? Would the menu be generated at page display time, or "manually" in the admin panel (I'm ok either way). Any examples of this already?
I think the simplest way would be to create a custom menu module. The absolute basic one would just output the list of reviews in a <ul> and then use some css to style the list.
I ended up creating a component that creates the whole menu structure at once, upon admin request. It just creates rows in the jos_menu table, as if the menus were created manually. Updating the hierachy is a pain (and I haven't completed that part), but creating the structure from scratch is pretty simple and works well.