Legacy Settings Sections return values doesn't work
Hi,
After save Settings to database, values doesn't bind in inputs.
How fixed this @ifox.dev ?
A
antonypl•363d ago
could PHP version make this error ?
K
kallefrombosnia•363d ago
Settings are planed to deprecate in the 3.x. Its much better to use normal singleton module anyway, since Settings are missing some features.
A
antonypl•363d ago
so, Settings default Area doesn't work as in 2.x (return saved fields) and you suggest to prepare custom module name this same as default Settings ?
K
kallefrombosnia•363d ago
Its the easiest solution to have singleton named Settings. Default Settings are not fully supporting all of the normal module features. I faced this recently, had issues with the media field only supporting one max media.
A
antonypl•363d ago
Mhm, so Dock suggest a mistake, if i use Legacy. BTW, why Legacy doesn't return any values from database, typical input field (no media) ?
A
antonypl•363d ago
I use docker, L10, Twill 3, PHP 8.1
K
kallefrombosnia•363d ago
Have you checked db, are values inserted?
A
antonypl•363d ago
yes, they insert well
A
antonypl•363d ago
A
antonypl•363d ago
id 3
K
kallefrombosnia•363d ago
It seems that https://github.com/area17/twill/blob/2.x/src/Repositories/SettingRepository.php#L52C3-L84 fail to get form fields.
But still, I wouldnt waste a time on this.
A
antonypl•363d ago
Ok, so i need build a custom Settings Models/Capsules. How unregister default settings routes ?
I
ifox•363d ago
hi guys, legacy Twill 2 settings should still work perfectly fine, especially on Twill 2 where they haven't been touched. They are just more limited in their capabilities, but should save and render fine.
ok I see you're on Twill 3 though. So if there's a regression on legacy settings we would still want to fix it
Could you please share your settings blade file?
A
antonypl•363d ago
@extends('twill::layouts.settings')
@section('contentFields')
@formField('input', [
'translated' => true,
'name' => 'subtitle_translated',
'label' => 'Subtitle (translated)',
'maxlength' => 250,
'required' => true,
'note' => 'Hint message goes here',
'placeholder' => 'Placeholder goes here',
'type' => 'textarea',
'rows' => 3
])
@stop
I
ifox•363d ago
thanks
can you show me the db row in the twill_settings table?
and those warnings in debug bar, which file/line produces them?
A
antonypl•363d ago
A
antonypl•363d ago
LOG.warning: substr_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php on line 575
WARNINGLOG
[09:09:53]
LOG.warning: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php on line 576
I
ifox•363d ago
alright, db looks good. What does
@dd($form_fields)
output in your settings blade file?A
antonypl•363d ago
I
ifox•363d ago
interesting
So the issue seems to be around having both translated and non translated fields
A
antonypl•363d ago
I clear db (db:wipe, twill:install) and this is my result:
A
antonypl•363d ago
before save
A
antonypl•363d ago
after save
A
antonypl•363d ago
db
I
ifox•363d ago
twill:install isn't really something you should be running more than once, but that's fine. can you try with only non translated and only translated fields?
A
antonypl•363d ago
Does stack colud make a problem (Docker + Ubuntu 22 + PHP 8.1)
?
A
antonypl•363d ago
Nope, no return value
I
ifox•363d ago
no I don't think your stack is the issue
A
antonypl•354d ago
after downgrade to Twill 2, settings legacy worsk fine
A
antonypl•349d ago
@ifox.dev . How fix this issue on Twill3
I
ifox•349d ago
Hi @antonypl we will take a look asap
A
antonypl•313d ago
@ifox.dev has been fixed ?
@ifox.dev it still not working 😦
I
ifox•311d ago
Well, I'm sorry it hasn't been able to be prioritized yet. Pull requests are welcome, you know.
A
antonypl•306d ago
So your answer "we will take look asap" (months later) sounds bad. This is crtical bugs, if used older version. Response from team should be a litte diffrent.
I
ifox•306d ago
This project is open source and entirely free, as well as our support @antonypl, so I'm not sure what makes you feel entitled to criticize that. We don't owe you anything, and you are using a feature that will be deprecated. We also provided solutions for you that you ignore. I didn't give any details as to when asap would be, and honestly if you're upset after a month, I suggest you revise your expectations when working with open source software.
Instead of complaining to people that are giving you a lot of work for free, try to migrate to the new settings feature, it will take you less time than sharing your frustrations with us
1.4KMembers
View on DiscordWant results from more Discord servers?
More PostsNew module item errorWhen i make a new module i get this error, i'm using the twill metadata pacakage
```Object { messagCustom form fieldsI'm trying to make a custom form field to override the custom WYSIWYG form field.
I've followed thiNew Settings approachHey, a i have a small question - how build a settings page like in https://demo.twill.io/settings/seRender repeater in block blade fileI have made a block named "gallery" with a repeater containing medias named "gallery-item", please hFetch all images in a blockHow do you fetch all the images in a block? For e.g i have this block <x-twill::medias
name="slRepeater without blocksHow do you add and render a repeater without including it in the block?Adding custom blocks to modulesHow do you add custom blocks to modules? Generally i add blocks to a module using $form->add(BlockEd$renderData returns null when trying to render nestedblocks@php
/** @var \A17\Twill\Services\Blocks\RenderData $renderData */
dd($renderData)
Fetch all models with field value of XSorry to ask such a basic question but I want to do the following....
I have a model called Work (anDisplaying Block elements on the Front Pagehow do you display block elements on the frontpage? And i don't mean the preview file. I want to accdashboard routeHello. I have a problem with dashboard config
I have a Category and CategoryArticle Models
I have aTwill Role based accessHow would i go about adding a Role based access to CMS Components and its entries. For e.g in an imaTwill assets errorHello to everyone i have an website in production builded in twill but some twill assets in there aWhere to find block repositories?I've seen in the tutorial(https://www.youtube.com/watch?v=kAcJ5G2GhiA) some blocks like "paragraph &[3.0.0] Block class - getBlockTitle()Hi,
I was trying to move Blade blocks to Class. When I wanted to move `@twillBlockTitleField` in cla[3.0.0] componentBlock overriding getBlockIcon doesn't seem to work?(Successfully changed the title by overriding it's static function)
Checked twill:list:icon for the[3.0.0] Maintaining automated Permalink Generation when using getCreateForm to add fields.As soon as I add any fields, using the Formbuilder on this function, the automated permalink disappemulti select selected optionsI'm using the multi select as documented in https://twill.io/docs/form-fields/multi-select.html#mult[3.0.0-rc4] - How to show current value in a select form fieldCurrently I have my select field defined as:
`@formField('select', [
'name' => 'work_year',
[3.0.0-rc4] Images not found on remote server - League\\Glide\\Filesystem\\FileNotFoundExceptionI just went from my local to my remote server and some images are showing up others are getting a 5