HoltBosse / Alba

Basic developer oriented CMS system
7 stars 2 forks source link

fields with constructors setting input to default param instead of id #371

Open workaj opened 3 weeks ago

workaj commented 3 weeks ago

affected fields:

Field_Textarea.php:     function __construct($default_content="") {
Field_RecaptchaV2.php:  function __construct($default_content="") {
Field_Text.php: function __construct($default_content="") {
Field_Antispam.php:     function __construct($default_content="") {
Field_FileUploader.php: function __construct($default_content="") {
Field_Turnstile.php:    function __construct($default_content="") {
Field_Honeypot.php:     function __construct($default_content="") {
Field_HTML.php: function __construct($default_content="") {

tldr is that wrong class variable is being set from the input because in https://github.com/HoltBosse/Alba/blob/87df948a145a37bf1a7d854b5e0c84e9491d96ef/admin/controllers/content/views/all/view.php#L448 it is called with the id. this currently isnt a major issue since the load_from_config method is called afterwords which writes over the top and fixes everything