Jump to content

bernhard

Members
  • Posts

    6,259
  • Joined

  • Last visited

  • Days Won

    312

Everything posted by bernhard

  1. What do you mean? For a guest user on development? On a live site you should never ever enable Livereload.
  2. Ok glad it was helpful. I never know the level of the users so it's sometimes hard do find the right amount of information ? Looks like you are just missing the |noescape filter. Use it with caution, see https://latte.nette.org/en/tags#toc-escaping-output The reason why you don't need it always is that many times RockFrontend/RockPageBuilder will return HTML objects so that Latte knows not to escape the output. If you return some html code as regular string then latte doesn't know anything and will encode entities for preventing some vulnerabilities.
  3. I just had a look at your example and answered the question about the latte syntax. I didn't think about what you are actually doing. The error message means that you provided an invalid selector, which is obvious in your case as you are - as I said - in PHP land inside the brackets. That means inside the brackets the $block->rpb_left will likely be a RockPageBuilder\FieldData object (similar to a PageArray). You can't to a $pages->get( FieldData ) and that's what it complains about I guess. What you are doing with " ... " is to typecast it to a string value and that makes it return the page ID if you have a single block in that field. If you had multiple blocks added to that field it would do something like $pages->get("1010|1011|1012") which would also cause an error! It's really nothing related to RockPageBuilder or Latte, it's just basic PW API usage. Didn't understand you where having problems with this, sorry. But glad you got it sorted.
  4. Once you are in a tag you don't need any brackets any more. Basically inside the bracket its regular php: {$pages->get($block->rpb_left)->text()}
  5. Hi @sebibu thx for the great feedback ? Technically you can achieve that by creating a new block called "layout". Then you create two new RPB fields, eg column_left and column_right. Then you can add blocks to those fields, for example add "headline", "text" and "image" blocks to the column_left field. Then you can go to column_right and click add new block and click reuse existing block for all of your blocks. For the frontend you have to create the markup of your layout in the "layout" block's template file (eg layout.latte or layout.view.php). The problem with such setups is that it get's more complicated and you are moving the sweet spot between easy of use and features more towards features at the cost of more complicated content editing. On the backend RPB will show a button for nested RPB fields to edit those fields in a modal (or panel I think). So editors have to save the base page first, then can edit nested content. On the frontend this should be less of an issue. You can try and report back what you find. Also @Stefanowitsch might have useful tips as he built a quite complex page using RockPageBuilder recently and I think he is going to share something soon?! ?
  6. Yes, quite easy ? $wire->addHookAfter( 'ProcessPageEdit::buildForm', function (HookEvent $event) { $form = $event->return; $page = $event->process->getPage(); // if page is young enough don't lock the page name field $lockPagenameAfterSeconds = 60; if ($page->created > time() - $lockPagenameAfterSeconds) return; // get field and set status to collapsed + locked $field = $form->get('_pw_page_name'); $field->collapsed = Inputfield::collapsedLocked; $field->notes = 'Can not be changed any more'; } ); Alternatively you could use $page->meta() to set a flag at some point instead of waiting 60s.
  7. I'll continue the monologue... Installation and setup has recently become a lot easier as I made UIkit and Tailwind a integral part rather than an optional addon. I guess anybody not wanting one of those components will never ever use the profile anyhow. The benefit is that for a full working setup all you have to do is follow the instructions of the welcome screen: No mercy for all those who have not tried this setup! ?
  8. You can have a look at https://github.com/baumrock/site-rockfrontend
  9. It should be there, of course. I just checked and I can reproduce this on my end, so I'll try to fix this asap. Can you please confirm that your user does also not see the clone icon?
  10. Hi @iank thx for the report - that has been fixed 2 days ago, just forgot to push it to main ? It is now available to download on my website! https://www.baumrock.com/en/releases/rockpagebuilder/
  11. Thx for sharing. Does it have a feature to auto-close the modal after page save (without errors) and then reload the page?
  12. Before I find time to add my very own wishlist let's not forget the PW requests repository
  13. Anything wrong with this? wire()->classLoader->addNamespace("MyModuleNamespace", __DIR__ . "/classes"); This will add an autoloader for all files in folder __DIR__ . '/classes' where all these files need to have the namespace "MyModuleNamespace". See https://github.com/baumrock/RockAdminTweaks/blob/a8b82fff339ecf403966d806db398d20286219cd/RockAdminTweaks.module.php#L28 for an example. As far as I know require_once is problematic in multi instance usage, because you have different paths for the same class and that causes "fatal error: cannot redeclare class XYZ ..."
  14. Hey @FireWire sorry for the trouble. Could you please provide step by step instructions to reproduce this?
  15. Hey @adrian this is a small issue but it gets annoying here while working on a new frontend as I see it on every page reload ? This is my layout: The blue border shows where the <body> is. I'm using a dark gray background for <html> and white background for <body> to make sure that the footer (the part where is says "Impressum / Datenschutz TBD" looks like it goes down until the page ends, but actually it ends where the blue line of the body is. This seems to work well, the only problem I see so far is that the tracy debug bar flickers on page load. It seems to be at the bottom of <body> because I tried making the body 100% height and the flash was gone. I also don't see it if I "disable tracy", but I still see it if I only "hide tracy" (the very right icon). Would it be possible to hide tracy until the DOM is loaded or until the final position of the bar has been calculated? Thx in advance! Update: I sometimes see the white stripe even if the bar is disabled! PS: I also tried to change my concept and make the body 100% and then make the body have gray background and make <main> have white bg, but that caused other problems with my layout so I'd prefer a solution that works with html+body ?
  16. Sorry, but I still can't reproduce it even with "hidden" setting... No logo field there... If you want to find the reason I think you have to debug that further and maybe check everything on a fresh install and see when/if you see the same bug. If you want a quick&dirty solution we could try to add a hookable method that runs after each migration of the settingspage where you should be able to override any settings.
  17. Hey @FireWire I can't reproduce. I tried the following: Do a modules refresh to make sure everything is set to default Check the logo field - it was opened by default. Edit template "rocksettings" Edit field "rocksettings_logo" in context of this template, set visibility to "closed + ajax loaded" Do a modules refresh again to run all migrations. The field was still ajax-loaded after the migrations. Can you please provide more details or step by step instructions?
  18. Hey @FireWire fields created by the module are migrated on every modules::refresh, so if fields define a default collapsed state then this will be applied to the field on every migration. This is intended. If you want to override this you can set different settings in template context, then your modifications should keep intact. Or am I misunderstanding?
  19. As I know you are using RockMigrations / RockPageBuilder have you seen https://www.baumrock.com/en/processwire/modules/rockmigrations/docs/magicpages/ ? It will let you define hooks in an init() or ready() method in your custom page class. There you can add hooks and RM will make sure it will only trigger init/ready once for each pageclass, which is one culprit when using loaded() as it will get triggered multiple times and potentially add hooks more often than once. Also it has shortcuts for often needed hooks, so for example you can hook the backend page edit form like this: public function editFormContent($form) { $form->add([ 'type' => 'markup', 'label' => 'foo', 'value' => 'bar', ]); }
  20. Anybody using this config setting $config->livereloadBuild = true; please update to the latest version v3.18.2 otherwise the "npm run build" will execute every second if you have multiple tabs open which will produce useless cpu cycles and make your computer feel like it's training for a marathon ??
  21. Great! v2.1.0 is the old one that is not maintained any more (last update was in Jan 2023):
  22. @Stefanowitsch is using FTP to deploy his websites and ran into problems with DDEV (see here for details). I didn't have these problems as I'm using automated deployments via RockMigrations + Github Actions, but I got this warning an every ddev start: Both issues are related as Randy explains here: https://github.com/ddev/ddev/issues/6381 The solution is to either disable mutagen or (imho better) to add this to your config: upload_dirs: - site/assets/files This should bring better performance, a startup without warnings and correct file permissions in /site/assets/files ?
  23. Hey @PavelRadvan this would be the correct syntax: filename: "{$page->name}.pdf", You just have to add the .pdf - that's the indented use. But I've pushed a "fix" that let's you use $page->name as well in v1.7.1
  24. Just upload them on https://imgur.com/upload then once you get "upload completed" copy the image address and post that into the message. That's what I've been doing for years, as I don't have any more upload space ?
Γ—
Γ—
  • Create New...