I have an interesting issue with a flux:flexform.field.select. Currently my set-up looks like.
<flux:flexform.field.select
name="link_type"
required="true"
default="5"
items="{
1: {0: 1, 1: 'LLL:EXT:my_ext/Resources/Private/Language/locallang.xml:flux.icon_link.fields.link_type.type-1'},
2: {0: 2, 1: 'LLL:EXT:my_ext/Resources/Private/Language/locallang.xml:flux.icon_link.fields.link_type.type-2'},
3: {0: 3, 1: 'LLL:EXT:my_ext/Resources/Private/Language/locallang.xml:flux.icon_link.fields.link_type.type-3'},
4: {0: 4, 1: 'LLL:EXT:my_ext/Resources/Private/Language/locallang.xml:flux.icon_link.fields.link_type.type-4'},
5: {0: 5, 1: 'LLL:EXT:my_ext/Resources/Private/Language/locallang.xml:flux.icon_link.fields.link_type.type-5'}
}" />
But this is causing an error and so my complete tab is not showing up in the "New Content Element" section. It appears to be to do with the length of the items section as I can remove any 2 of these items and it will work. I cannot see anything in the error logs.
How are new tabs in the "New content element" section created? Or is there any known issue with items length?
Finally the issue us solved for all other members of my team the first option worked, for me the second was hiding the fact that the first worked:
The Apache stack size should be increased. The Typo3 install tool advised us to insert the following to httpd.conf.
ThreadStackSize 8388608
We experienced a kind of encoding problem, the db dump which was used for dev environment initialization was broken in terms of encoding. Any installation of Typo3 + Fluid is broken with that dump.
Related
Trying to add a new page in a Laravel BackPack project, using the PageManager addon gives the following error:
SQLSTATE[HY000]: General error: 1364 Field 'template' doesn't have a default value
Expanding the Ignition error message shows the following:
INSERT INTO
`pages` (
`name`,
`title`,
`slug`,
`content`,
`extras`,
`updated_at`,
`created_at`
)
VALUES
(
dghj,
fghj,
fghj,
?,
{ "meta_title": NULL,
"meta_description": NULL,
"meta_keywords": NULL },
2022 -09 -12 16: 19: 59,
2022 -09 -12 16: 19: 59
)
...there's no sign of a template in this query but (I believe) it should be added by the PageManager addon so isn't something I have control of.
None of the frames in Ignition show files I've worked on, they're all illuminate or vendor files, however I've set up a new base app containing Laravel, Backpack and Backpack PageManager only, which works as expected so I don't think this is a bug in a package. I'm at a loss as to what I've done wrong or how to go about finding/resolving the problem.
Further info:
Selecting a template in the CRUD view DOES prompt the JS pop-up 'Are you sure you want to update the page template', confirming DOES update the URL to include the GET parameter e.g. [domain]/admin/page/create?template=standard
PHP Version: 8.1.9
Backpack version: 5.3.12
I also have the MenuCRUD addon installed which is reliant upon PageManager and is working as expected.
I managed to find the issue.
For whatever reason a view had been published to resources\views\vendor\backpack\crud\fields\select_page_template.blade.php
This file included:
<select class="form-control" id="select_template" name="select_template" ... >
Changing the name to 'template' resolved the issue:
<select class="form-control" id="select_template" name="template" ... >
Neither of these variations match what's in the original version of the file here, which doesn't even include a name attribute on the input. I'm not sure why mine does, but is all seems to be working now so I'll let sleeping dogs lie and leave this page up in case it benefits anybody else.
I've got a simple task at hand: to plot integer-integer value pairs using line chart or XY chart or whatever using bean type of datasource. The bean in question returns long value both for X and Y axis. The default behavior one would expect is to show ticks of 1, 2, 3, 4, etc. on both axis.
But no, I get values like 2.5 or 1E1 for the same application running on two different machines! OK, this old post suggests to set tickLabelMask to "#". Now integers are indeed displayed, but with repeating values, like 0, 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, etc. The same post suggests I add two properties to my report,
net.sf.jasperreports.chart.domain.axis.tick.interval
net.sf.jasperreports.chart.range.axis.tick.interval
Unfortunately, these have no effect when added at report level in JRXML file. When I try to add them at chart level between <reportElement ..> tags, Jaspersoft Studio removes them once I save the file. So, I take it , something has changed.
So, how could I fix this issue?
I'm using Jaspersoft Studio 6.9.0 and Jasperreports 6.6.0
Nowadays it's done using "Chart customizers". General info can be found here. To put it short, in design view select the chart, go to Properties window, select "Chart" there, scroll down to "Chart customizers" section, click "Add", and the choose range and tick customizer.
Additional artifact must be included into your project: jasperreports-chart-customizers
How can I remove the select "Rows per page"? I don't want to use it in my project...
Correct answer you should find in documentation. For the property rowsPerPageOptions one says:
Customizes the options of the rows per page select field. If less than two options are available, no select field will be displayed.
So you have to specify rowsPerPageOptions={[]}, that's all folks.
The documentations could be found here.
Just assign the attribute labelRowsPerPage in TablePagination tag to an empty string.
<TablePagination
labelRowsPerPage=''
{...otherProps}
/>
I cannot comment yet, unfortunately.
But for MUI 5 I got an error when attempting the empty array.
It is possible that the cause is my pageSize is set to 5, so the following worked fine for me:
pageSize={5}
rowsPerPageOptions={[5]}
This is an answer for the comment from FooBar:
It's a nice solution, but it will show an error in Material UI 5: Material-UI: The page size 100 is not preset in the rowsPerPageOptions Add it to show the pagination select. – FooBar Oct 26 at 14:26
Just add the options property with paging as false to your JSX call for Material Table
<MaterialTable
//your other props
options={{
paging: false
}}
/>
Since updating from Flux 6.0.2 to the newest Flux TER-Release (7.0.0) I have the problem that all my defined flux:field.select items are switched. I have them defined as an array like this items="{0: {0: 'value shown as a CSS class in the frontend',1: 'value shown in BE'},}". But now I get the BE value in the frontend template.
Also all my content elements from my provider extension are shown twice (without a title) in the backend and the fields defined in the 'Configuration' section of my content element are shown twice.
There's also a RTE field shown at the bottom of my content element that has not been there before.
BE Output: view
Code on Pastebin: http://pastebin.com/CNcphn2k
Any help deeply appreciated.
EDIT:
I just set up a fresh instance of TYPO3 6.1.9 (blank package) and installed my extension with the above mentioned content elements. Dependencies were resolved automatically as it should (newest versions). Via the content wizard I tried to create a new element and I get the same result as in my existing install I first noticed this bug in.
EDIT2:
I was able to narrow it down to the flux:form.container tag. This duplicates the output in the BE. The select values are still switched though.
It is possible that you missed this official announcement:
http://fluidtypo3.org/blog/news/new-colpos-value.html
Failure to run the update script before letting TYPO3 change the type of the colPos value will result in the symptoms you describe. There is, unfortunately, no way to restore this (since your SQL will have cropped off all negative values and made them zero without any backup).
Restore from a backup and run the script and you should be fine.
I'm trying to access fluid page configuration inside a template.
In detail: I added a selectfield to my page layout
<flux:flexform.field.select name="pageIcon" items="{
0: {0: '{f:translate(key: \'pageIconNone\')}', 1: ''},
1: {0: '{f:translate(key: \'pageIconFacebook\')}', 1: 'fa-facebook-square'},
2: {0: '{f:translate(key: \'pageIconFlickr\')}', 1: 'fa-flickr'},
3: {0: '{f:translate(key: \'pageIconGooglePlus\')}', 1: 'fa-google-plus-square'}
}"/>
So far so good. Now I render a menu an want to access this field pageIcon
<v:page.menu.directory pages="{settings.pid.socialMenu}" useShortcutData="TRUE" classFirst="first" classLast="last">
<f:for each="{menu}" as="mainPage" iteration="iteration">
<i class="fa {mainPage.pageIcon} fa-2x"></i><b>{mainPage.title}</b>
</f:for>
</v:page.menu.directory>
But this does not work. After some debugging I noticed, that this configuration seems to be stored in tx_fed_page_flexform which holds an XML array.
How can I access the XML values inside my fluid template?
Markus
The easiest way:
https://fluidtypo3.org/viewhelpers/flux/master/Form/DataViewHelper.html
<flux:flexform.data table="pages" field="tx_fed_page_flexform" uid="{pageUid}" as="pageData">
{pageData.pageIcon}
</flux:flexform.data>
The reason for not extracting this data always, is simply for performance. There is another way which you may not be aware of:
<flux:flexform.field.select name="pages.pageIcon" items="{...}" />
If you name your field thusly (the pages. prefix is the key since we are using the pages DB table) your value will be saved into a field in the record itself (a field you must then add in the SQL schema / TCA, and enable value sliding in the rootline if you desire it). If a field with this prefix is saved, Flux will insert its value directly into the pages record which means you can immediately access it using for example {pageVariable.icon} without the need for the flux:flexform.data ViewHelper.
UPDATE
For more recent version of Flux, try:
<flux:form.data table="pages" field="tx_fed_page_flexform" uid="{pageUid}" as="pageData">
{pageData.pageIcon}
</flux:form.data>