Klenkes Posted January 17 Share Posted January 17 After reviewing RPB for a long time(and having a few issues) I now decided to use it in projects. But now... problems show up and I don't know how to approach this. Setup: A Onepager, SPA A few RPB fields like rockpagebuilder_events or rockpagebuilder_news ... with blocks assigned. RPB 5.0.3 PW 3.0.229 In this setup I don't need the title field in my blocks, so I sett them all to 'hideTitle' => true It worked. Some time after that I noticed that when adding a new PW page with no RPB blocks, just a simple PW for imprint or privacy ploicy, only the name field shows up, no title field: Even when creating a new template no default title is added. After generating a name and saving the new page no error about the required title is thrown. The page will be created with an empty title! After that the title fie3ld is shown. I commented out //hideTitle => true in a all blocks, but the problem remains. I manually deleted all cached and compiled files and now I am puzzled with this. No additional hooks or anything. Where do I look? What to do? How do I go about this? Could be connected to another problem I will post next. 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Thx for the report. I'm sure we'll be able to fix your problems! First of all it's weird what you experiencing. I've never seen this and I can't explain how that should even be possible. Have a look at what hideTitle does: /** * Hide title field if block has setting "hideTitle" */ public function hookHideTitleField(HookEvent $event) { $block = $event->process->getPage(); if (!$block instanceof Block) return; if (!$block->getInfo()->hideTitle) return; $event->return->remove('title'); } So for a quick test you could just add a "return" at the very top of this method in RockPageBuilder.module.php Let me know what happened ? Are you using RockMigrations or are you doing everything with the GUI? 1 Link to comment Share on other sites More sharing options...
Klenkes Posted January 17 Author Share Posted January 17 Thanks. Ich will check this out. No GUI, I am using RockMigration with the complete migration code in all the blocks. For an easy reusing blocks in other projects. Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Just now, Klenkes said: No GUI, I am using RockMigration with the complete migration code in all the blocks. For an easy reusing blocks in other projects. ?? 10 minutes ago, Klenkes said: I commented out //hideTitle => true in a all blocks, but the problem remains. I'm not sure about this one. Often when working with RockMigrations REMOVING things is not enough. For example if you have set a "description" or a "notes" property of a field and then remove it, the value will still be in the DB. So you need to set it to an empty string to remove it. I don't think that "hideTitle" is stored in the DB though. So it should be fine to comment it out here. But what you can do is change it to "false" and try if that makes a difference. Link to comment Share on other sites More sharing options...
Klenkes Posted January 17 Author Share Posted January 17 12 minutes ago, bernhard said: So for a quick test you could just add a "return" at the very top of this method in RockPageBuilder.module.php Unfortunately, no luck. (with module refresh, delete compiled files and the whole shebang) Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 20 minutes ago, Klenkes said: Even when creating a new template no default title is added. Ok I can reproduce this so I'll have a look into this instantly! I'll be back ? 1 Link to comment Share on other sites More sharing options...
Klenkes Posted January 17 Author Share Posted January 17 Again, even more relieved... I set all blocks to hideTitle => false but no change. Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Yeah I don't think it has anything to do with that setting. It's related to RockMigrations I guess. I'm already searching and just killed my current project by disabling autoload for RockMigrations. Not a good idea if you are using MagicPages because then nothing will be usable any more, no frontend, no backend ? I had to add this at the very top of index.php and then enable autoload back to normal: require_once __DIR__ . "/site/modules/RockMigrations/classes/MagicPage.php"; Maybe someone finds this info helpful some day ? 1 Link to comment Share on other sites More sharing options...
Klenkes Posted January 17 Author Share Posted January 17 Better save everything now... I did. Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Ok first bug will be fixed in the next release. The field hints for rockmigrations messed up the field select, so if you saw something like the below that's history ? I'm working on the issue with having no title field now as that is something else unfortunately ? 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Installed RockMigrations - all good Installed RockPageBuilder (+RockFrontend) - all good Installed Accordion Demo Block - all good Installed TracyDebugger - all good Do you have any other Rock modules installed on that website? Link to comment Share on other sites More sharing options...
Klenkes Posted January 17 Author Share Posted January 17 Nope! No other Rockmodules. 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Could you please send me all your blocks as zip? Link to comment Share on other sites More sharing options...
Klenkes Posted January 17 Author Share Posted January 17 Send to your office@ Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Ok this one is a very easy fix for everyone experiencing this! Just make sure that the title field has the global flag enabled: I don't know why or when it loses that flag yet, but I have it on 2 projects so it seems to be an issue. It would be nice to get some feedback if anybody else is experiencing this as well? 1 Link to comment Share on other sites More sharing options...
Tiberium Posted January 17 Share Posted January 17 I had the same issue and fixed it in the same way last year - i thought i changed the setting and was responsive for it - so i didn't report it. 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 21 minutes ago, Denis Schultz said: I had the same issue and fixed it in the same way last year - i thought i changed the setting and was responsive for it - so i didn't report it. Thx for the report! And since then no issues any more? Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Could you @Klenkes and @Denis Schultz please install RockMigrations v3.35.3 (latest release on the main branch)? That will add a check for the title's flags on every run of migrations and log some information to the log and show a warning on the backend. If that happens it would be great if you can report what you did and when it happened and maybe share some informations from the log! Link to comment Share on other sites More sharing options...
Tiberium Posted January 17 Share Posted January 17 12 minutes ago, bernhard said: Thx for the report! And since then no issues any more? I had it on two installation in the past (Nov/Dez timeframe). But then not more. Both had RockMigrations, one had RockFronted - but they didn't had/have RockPageBuilder. 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Update: Ok showing the error message was a good idea. I can now reproduce the issue. For me it happens when I remove the title field from a RPB block. 1 Link to comment Share on other sites More sharing options...
Tiberium Posted January 17 Share Posted January 17 I don't know if it belongs here, but i installed .5 and get some log with markup error in the log view, where the html notation gets showed in the url col (and the link is also broken): Aside from that, everything is smooth. I was too slow for testing with .4 and your check ? Link to comment Share on other sites More sharing options...
Klenkes Posted January 17 Author Share Posted January 17 1 hour ago, bernhard said: Update: Ok showing the error message was a good idea. I can now reproduce the issue. For me it happens when I remove the title field from a RPB block. Exactly. It has nothing to do with hideTitle, it's removing the title field from a block. With RM 3.35.5 the error is shown. Link to comment Share on other sites More sharing options...
bernhard Posted January 17 Share Posted January 17 Ok great, I found the issue and now everything makes sens! ??? Please grab the latest release of RockPageBuilder here https://www.baumrock.com/en/releases/rockpagebuilder/ and also upgrade RockMigrations to v3.35.5 The Problem was the removeFieldFromTemplate() method in RockMigrations. This method also removed global fields from any template if the "force" parameter was true. This operation made the title field non-global, which led to the problems we were seeing. Which makes sense now. Usually it's very unlikely that this ever happened but when working with RockPageBuilder you often have blocks that don't need a title field. That's the same for repeater fields, so I explored how it is done there. It would not be ProcessWire if there was not already a solution for it ? So I learned that every template has a "noGlobal" flag that you can enable and if that flag is enabled then global fields will not be added on template creation and it will also make sure that the RPB blocks don't make any problems if you remove any global field (eg the title field). That's a great update and makes RockMigrations a lot better. Thx for the reports and help with Debugging! Enjoy the new release and please mark the topic as 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