Yipper Posted 14 hours ago Share Posted 14 hours ago (edited) I started setting up a website and then in the process installed RockPageBuilder (and installed all the example blocks). Before that I have set the system "title" field to "TextLanguage". Now I wondered why my Headlines lost their multilanguage settings and saw that log: Fields: Deleted field "title" data in 0 row(s) from 0 page(s) using template "rockpagebuilderblock-logos". [page-by-page] +2 I'm not sure how that template does that and where? Edited 13 hours ago by Yipper Link to comment Share on other sites More sharing options...
bernhard Posted 14 hours ago Share Posted 14 hours ago Hey @Yipper thx for the report! 3 minutes ago, Yipper said: Fields: Deleted field "title" data in 0 row(s) from 0 page(s) using template "rockpagebuilderblock-logos". [page-by-page] +2 This comes from the "fields-" (fields minus) key in Logos.php which tells RockMigrations to remove all fields that are not listed in the array. I'm not sure why that would cause the title field to change from textLanguage to text, though. Can you try removing the minus and let me know how/if that changes behaviour? Link to comment Share on other sites More sharing options...
Yipper Posted 14 hours ago Author Share Posted 14 hours ago (edited) 24 minutes ago, bernhard said: Can you try removing the minus and let me know how/if that changes behaviour? u mean here, right? //site/modules/RockFields/blocks/Logos/Logos.php (is this used or only copyied from there to site/templates/RockPageBuilder/blocks/Logos/Logos.php 'templates' => [ $this->getTplName() => [ 'fields' => [ //removed "-" self::field_logos, ], ], ], removed the - on both logos.php and tried commenting out the whole migrate section there. strange this is, the message from above disappears, but the field is still set back to normal text field. Edit 1: searching for 'fields-' => showed that this is also included in the /stubs/.Block.php (which I thought I had from here https://www.baumrock.com/en/processwire/modules/rockpagebuilder/docs/stubs/#example-custom-php-stub , but there is no "fields-" there?! public function migrate() { $rm = $this->rockmigrations(); $rm->migrate([ 'fields-' => [ // Optional: Hinzufügen von Feldern, z. B. für Farben oder Inhalte "{$this->prefix}title" => ['type' => 'text', 'label' => 'Titel'], "{$this->prefix}content" => ['type' => 'textarea', 'label' => 'Inhalt'], ], 'templates' => [ $this->getTplName() => [ 'fields' => [ "{$this->prefix}title", "{$this->prefix}content", ], ], ], ]); } and therefore was added with a test block. removing the "-" alone doesn't solve it either. but commenting out the migrate() function in that test block and the logos block solves it (for now) Edited 14 hours ago by Yipper added infos Link to comment Share on other sites More sharing options...
bernhard Posted 14 hours ago Share Posted 14 hours ago 15 minutes ago, Yipper said: removed the - on both logos.php and tried commenting out the whole migrate section there. strange this is, the message from above disappears, but the field is still set back to normal text field. I'd not say it's strange. It makes sense. I just tried to confirm that the log you posted is not related to the issue you are seeing. What I'd do: Confirm that your change is coming from RockMigrations To do so check "Disable all migrations" in RockMigrations module settings. Then set your title field back to "textLanguage" Do a modules refresh, or even better run php site/modules/RockMigrations/migrate.php from the command line (you get more logs) Is your title field still "textLanguage"? yes --> seems like RockMigrations is the issue To confirm remove the tick on "Disable all migrations" Do a modules refresh (or run migrate.php) Is the title field now "text"? Yes --> confirmed that RockMigrations is the issue No --> should not be possible IMHO no --> something else is changing the field type. maybe another module? or maybe some of your own code? If you can confirm that RockMigrations is the issue you should have something like this somewhere in your codebase: 'type' => 'text', "type" => "text", The problem is that it might exist in any variation, like "type" => 'text', with or without comma, etc.; Let me know if you find something. 1 Link to comment Share on other sites More sharing options...
bernhard Posted 14 hours ago Share Posted 14 hours ago 31 minutes ago, Yipper said: 'fields-' => [ // Optional: Hinzufügen von Feldern, z. B. für Farben oder Inhalte "{$this->prefix}title" => ['type' => 'text', 'label' => 'Titel'], "{$this->prefix}content" => ['type' => 'textarea', 'label' => 'Inhalt'], ], If $this->prefix is empty you set the type of the "title" field to "text", which would explain your issue! 1 Link to comment Share on other sites More sharing options...
Yipper Posted 14 hours ago Author Share Posted 14 hours ago 5 minutes ago, bernhard said: I'd not say it's strange. It makes sense. I just tried to confirm that the log you posted is not related to the issue you are seeing. yes, after adding the "fields-" in the logos.php the message is back, but the problem is gone. so 6 minutes ago, bernhard said: 'type' => 'text', this was the problem in my test block (where I have no idea where I got that from) Link to comment Share on other sites More sharing options...
bernhard Posted 14 hours ago Share Posted 14 hours ago Ok great, please change the name of this thread to "[solved] ..." 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now