aleksdish
12/10/2021, 3:32 PMpboivin
12/10/2021, 3:37 PMdashboard.modules config, I think it's the label_singular keyFourStacks
12/10/2021, 3:54 PMmedias route this was ultimately due to an error that was thrown within the replaceAccents helper method in media_library_helpers.php.
The error in question was thrown by the iconv usage within that helper with the message wrong encoding, conversion from utf-8 to ascii//translit is not allowed.
I got around this by adding the following custom helper in my app to override the one from Twill:FourStacks
12/10/2021, 3:55 PMif (!function_exists('replaceAccents')) {
/**
* @param string $str
* @return bool|string
*/
function replaceAccents($str)
{
return mb_convert_encoding($str, 'ASCII', 'UTF-8');
}
}FourStacks
12/10/2021, 3:55 PMiconv but couldn't get it to work. For reference I'm using a PHP8 docker deployment on Vaporpboivin
12/10/2021, 3:57 PMFourStacks
12/10/2021, 3:58 PMpboivin
12/10/2021, 3:59 PMFourStacks
12/10/2021, 4:00 PMlluukkyy
12/10/2021, 4:46 PMpublic function products()
{
return $this->hasMany(Product::class);
}
the product model got
public function page()
{
return $this->belongsTo(Page::class);
}
in the pageRepository i added
public function afterSave($object, $fields) {
// or, to save a belongToMany relationship used with the browser field
$this->updateBrowser($object, $fields, 'products');
}
but on save i am getting "Call to undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany::sync()"
any idea?pboivin
12/10/2021, 4:51 PMlluukkyy
12/10/2021, 4:51 PMpboivin
12/10/2021, 4:52 PMlluukkyy
12/10/2021, 4:52 PMlluukkyy
12/10/2021, 5:08 PMSQLSTATE[42S22]: Column not found: 1054 Unknown column 'products.page_id' in 'where clause' (SQL: select * from `products` where `products`.`page_id` = 17 and `products`.`page_id` is not null and `products`.`deleted_at` is null)`
i tougth the idea of hasRelated is, that it is connected with "Twill's own related table"pboivin
12/10/2021, 5:21 PMHasRelated trait.lluukkyy
12/10/2021, 5:22 PMpboivin
12/10/2021, 5:23 PMbelongsTo and hasMany) or call updateBrowserlluukkyy
12/10/2021, 5:24 PMkalle
12/12/2021, 11:46 AMIvan Markov
12/13/2021, 9:06 AMaleksdish
12/13/2021, 10:33 AMHarings Rob
12/13/2021, 11:09 AMaleksdish
12/13/2021, 11:11 AMaleksdish
12/13/2021, 11:11 AM'paragraph' => [
'title' => 'Paragraph',
'icon' => 'text',
'component' => 'a17-block-paragraph',
],aleksdish
12/13/2021, 11:12 AMHarings Rob
12/13/2021, 11:12 AMHarings Rob
12/13/2021, 11:12 AMaleksdish
12/13/2021, 12:00 PMBA7YA
12/13/2021, 12:04 PM