iank Posted November 17, 2023 Share Posted November 17, 2023 Hey @bernhard, me again! When developing a new block, I was adding it to a page repeatedly, but not saving the page. Instead I would cancel editing and ignore the 'changes not saved' popup, to add more features to the block and try it again. I then realised that this was creating pages under the RockPageBuilderBlocks tree that seemed to be orphaned, containing just my default settings. Of course I can delete these pages, but do you think there might be a way to identify any such orphaned blocks and remove them automatically? Thx, Ian. 1 1 Link to comment Share on other sites More sharing options...
bernhard Posted November 17, 2023 Share Posted November 17, 2023 Thx for the kick in my *** ? This has been on my list for quite some time ? I've just pushed v4.7.4 to github and it's ready for you to download on my website ? Blocks will now be deleted whenever a page with a rockpagebuilder field is saved. Let me know if everything works as expected! 2 Link to comment Share on other sites More sharing options...
iank Posted November 18, 2023 Author Share Posted November 18, 2023 14 hours ago, bernhard said: Thx for the kick in my *** ? You're welcome! ?. I can confirm that this solves the issue. Orphaned blocks are indeed removed when the page is saved. Thanks! Ian. 2 Link to comment Share on other sites More sharing options...
Klenkes Posted February 28 Share Posted February 28 Sorry to UNSOLVE this... but for me it doesn't work at all. When adding a new block in the frontend and the modal is closed immediately an orphaned block exists. No saving in the backend resolves this. Am I missing something? PW 3.0.229 RPB 5.2.0 Link to comment Share on other sites More sharing options...
iank Posted March 26 Author Share Posted March 26 Hi @bernhard, Just revisiting this. I hadn't noticed, but @Klenkes is correct - the orphaned block deletion is broken again in newer versions of RockPageBuilder. It did work up to at least v5.0.3 but it looks like an extra check was later added in getUnusedBlockIds(): // never delete blocks younger than 10s 'created>' => time() + 10, Which I believe is saying "find unused blocks that also have a created time newer than 10 seconds in the future". Hence it's not going to find any. Changing to this: // never delete blocks younger than 10s 'created<' => time() - 10, Appears to resolve the problem, and I think is doing what the comment says? Thx, Ian. 1 Link to comment Share on other sites More sharing options...
bernhard Posted March 26 Share Posted March 26 Hey @iank thx a lot for your message and sorry @Klenkes for the delay. I have been working on a solution for this but I totally misunderstood what you were saying ? I thought you are talking about temporary blocks, not orphaned blocks! But at least I've made progress with the other problem as well ? I'll look into that tomorrow, thx! Link to comment Share on other sites More sharing options...
bernhard Posted March 31 Share Posted March 31 Thx @iank and @Klenkes please grab version 5.3.2 which has the fix provided by @iank - thank you very much!!! ? PS: Please mark the topic as [solved] again, thx ? 1 Link to comment Share on other sites More sharing options...
Klenkes Posted April 2 Share Posted April 2 Hello @bernhard Since yesterday I am unable to login to download the latest release. Endless loading... (different browsers) 1 Link to comment Share on other sites More sharing options...
bernhard Posted April 2 Share Posted April 2 Hey @Klenkes thx and sorry for that, forget to check a checkbox after the RockForms update ? It should be working now, please check! Link to comment Share on other sites More sharing options...
iank Posted April 2 Author Share Posted April 2 Thanks @bernhard, looks like this is now fixed. I'll mark this 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