Jump to content

bernhard

Members
  • Posts

    5,650
  • Joined

  • Last visited

  • Days Won

    260

Everything posted by bernhard

  1. I've experienced similar problems and didn't have time to investigate, so I'm also interested in a solution! Thx for bringing that up! πŸ™‚
  2. Hi @Chris-PW thx for your response! I think what you say makes sense! What about doing a video call on Friday? I'd be available from around 10:00 - 17:00 @ vienna. Anybody wants to join the discussion @dotnetic @gebeer ?
  3. Actually that site does not work πŸ˜„ I chose AT first, then visited https://www.siemens-healthineers.com/at/clinical-specialities (AT), then changed back to DE-CH https://www.siemens-healthineers.com/de-ch/clinical-specialities and there all menu items lead me back to AT πŸ˜› Such a complex project/setup combined with a sparfux/quick-and-dirty solution sounds like trouble in the long run πŸ˜‰ It sounds like this project is one of those where all the time and effort that you put into it upfront will pay off later.
  4. Try visiting the site with incognito mode of your browser. Does it show the same behaviour?
  5. We've just launched www.kollar.at and I'll share it in the showcase soon, but on all my latest websites I have the problem that WhatsApp will not grab the preview image from the og:image tag 😞 I've tried several things, but nothing seems to work. The strange thing is that facebook grabs the image correctly and on older websites I'm using the same tags (at least I think so) and it works. This is how it looks like in the facebook linter: This is how it looks on whatsapp: This is how it should look like (from another project of mine): What I already checked: The image is publicly accessible The image is at least (exactly) 1200x630 The image has < 300kb It's not a caching issue - I've tried ...?v=1 etc I've asked my AI and it didn't see any problems with the markup As you can see in the screenshot the page description does also not show up. I'm using ProCache, so I'm wondering if the minified markup might be a problem? If anybody has ideas and can help I'd really appreciate that!
  6. You can either use hooks: <?php $wire->addHookMethod("Page::thumbnail", function(HookEvent $event) { $event->return = ...; }); Or even better you use custom page classes (it's really easy thx to pw!) and there you create a DefaultPage class that adds your method: <?php namespace ProcessWire; class DefaultPage extends Page { public function thumbnail() { return ...; } } Then you just make sure that thumbnail() always returns a PageImage object and then in all your templates you can do this: echo $page->thumbnail()->size(100,100)->webp->url; And it will automatically render either the custom or the fallback image. Check out https://processwire.com/blog/posts/pw-3.0.152/#new-ability-to-specify-custom-page-classes for details
  7. What I really love about AdminStyleRock is that you simply set one color and the PW backend immediately looks like it was built only for this client: But I'm not a Designer, so I just kept it very much like the default uikit theme. What I don't like is that several parts, especially the important page edit screen and all the inputfields have very low contrast and as I'm using dark mode now I think all the white is quite heavy on the eyes. What I don't like on the reno theme though is that it has totally unique and opinionated colors that never ever fit any of my client's CI. It's really easy to adjust everything of the style using simple css/less, but unfortunately several years passed by and nobody did improve this foundation. I wonder if some designers are still afraid of messing around with the css/less, so I want to ask if we have any designers here that want to work in improving the style in collaboration with me? We can do video calls or I can try to work from figma designs. Maybe we could even think of adding a light/dark mode toggle as we are working on it. Another thing that is not ideal is that it seems to be impossible to find all existing admin styles in the modules directory at the moment? Using the search I found these: In terms of design I think @Noel Boss AdminThemeBoss is very nice, but I don't like that it's an AdminTheme and not just a Style. And I'm not sure if he is still active in the PW world? If anybody has opinions to share or ideas on how to improve the situation please go ahead!
  8. I think even if that is not a scenario that's built into PW you have many options to solve it. It all depends on your exact needs. One option could be to reflect the geographic entities in the page tree, so you'd have a page /germany for the german part and /france for the french part etc. That would have the benefit that routing is built in, but if you had pages to share across several countries you'd have to either copy content or use a workaround. For example you could create a page of type "reflectionpage" or similar with only a single page reference field and then you could make /germany/foo reflect the content from /france/foo; I'm not sure how to handle different languages then in this case, but there's always a way in PW πŸ™‚ Another option could be to use the same pages with an identical pagetree and then assign pages to different units/regions. That would mean you create a page /foo and you assign it to "Germany" and "France". Then you could alter the page path with hooks and build custom menus and custom routing reflecting that differences. See https://processwire.com/talk/topic/1799-routes-and-rewriting-urls/ for example. I think you have to carefully analyse the exact requirements and weigh pros and cons of each approach and then decide wich route to take πŸ™‚ Good luck, sounds like an interesting project!
  9. Never done that myself, but my quick feeling says having both in the url is the best solution. I don't like geo detection at all. I hate it whenever I go to the nette framework docs and get the german version of the docs as I'm always reading docs in english, for example. And does geo detection even work well with ProCache (if you are using it...)? One thing to make it maybe look a bit nicer is to use a 3-letter-code for the region and a 2-letter-code for the language? example.com/aut/en or maybe even example.com/oesterreich/en ? Not sure if longer/shorter urls impact SEO somehow?
  10. We are human, such things happen πŸ™‚ Thx for sharing!
  11. I'm not sure what you mean by that? RockShell is extendable by design. You can place your own commands either in /site/assets or in /site/modules/YourModule/RockShell/Commands/ A simple command is as simple as that: class HelloWorld extends Command { public function handle() { $this->write("Hello World!"); return self::SUCCESS; } } Docs are here https://www.baumrock.com/en/processwire/modules/rockshell/docs/custom/ , it's actively developed (https://github.com/baumrock/RockShell/releases) and contributions are welcome.
  12. Hello ProcessWire community, it's been a while since I last shared a project showcase with you all πŸ™‚ Today, I'm excited to present a recent project we've been working on: The website of the Austrian artist Tanja Boukal - www.boukal.at This project has been an interesting journey, and I'm excited to highlight some of the features and solutions we implemented: First off, I had to make the project run on my local development computer. That was quick and easy thanks to DDEV, where you can easily define the setup in a simple yaml file (eg php7.4, mariadb 10.2, etc) and then update the setup to a current one and see what breaks and then apply all updates πŸ˜„ Then, we tackled the challenge of cleaning up everything from the old ProcessWire website (not done by me). The page was quite a mess. I'm not blaming anybody for that, but I guess we all know the problem: The developer has some structure in his/her had and it works great at the beginning. But then the real world kicks in and slightly different needs pop up here and there and quickly the initially planned structure is not sufficient any more. We need a gallery on a page we didn't plan upfront, or we need some additional text above or below some other elements where we don't have Inputfields... So the client ended up creating several pages on the root level to be able to input the desired content and then link wildly to those hidden pages. Actually I think she did a great job, because she got things done without needing help from a developer (which costs money as we all know). During that process and thanks to RockPageBuilder we got rid of many unnecessary templates while providing the client with a lot more flexibility than before 😎 Before the relaunch: After the relaunch (with AdminStyleRock for styling the backend in the client's colors): Not only was the content on the old PW site structured completely different than on the new one, we also had two WordPress blogs that had been around that we wanted to integrate into the new website. Both RockShell and RockFrontend's DOM-Tools where extremely helpful in that process! We even used @FireWire great Fluency module to translate imported blog posts on the fly! This command is simply put into /site/modules/Site/RockShell/Commands/ImportAegean.php and will then instantly be available to RockShell as import:aegean command 😎 And then you can run "rockshell import:aegean", watch it do its work and enjoy 😎 Another pain for the client was that many people in the arts industry still rely on printed information. So she wanted to provide all the information about her work not only on her website but also as downloadable PDFs. On the old website this process was all done manually and whenever she had a new work/catalogue/project to share she had several things to update. Now she only updates that information on one place and RockPdf creates an updated PDF for her - with all entries sorted automatically by date πŸš€ As mentioned RockPageBuilder adds a lot of flexibility to the website and makes editing content easier than ever before: But that's not a one-way-road! Where necessary we can still provide a more rigid structure and add custom fields that show up at dedicated places not movable by the client - for example date, cover-picture and teaser-text that should show up on all blog pages at the very top and at the exact same place: After that identical header section the client is free to choose from all available content elements like regular text, downloads or youtube videos (fully gdpr compliant without the client thinking about that). The work section showcases her artworks, projects, exhibitions and catalogues. All are linked to each other with the great ConnectPageFields module. So for example the https://www.boukal.at/work/projects/the-aegean-project/ has several other pages connected and also has its own blog! Ah, every aspect of the website is multilingual, which is also cool and where ProcessWire shines once more - especially with one-click-translations thx to Fluency! Another nice feature is that the page shows indicators for external links: This is a CSS-only solution and quite easy to implement (using LESS syntax): // style external links with icon body > *:not(#tracy-debug):not(.no-icon) { a[href^="http://"]:not([href*="www.boukal.at"]):not(.no-icon):after, a[href^="https://"]:not([href*="www.boukal.at"]):not(.no-icon)::after { content: url("/site/templates/images/external-link.svg"); display: inline-block; position: relative; top: 3px; margin-left: 5px; } } The site has top-notch performance thanks to the brilliant ProCache module and we did do some basic lighthouse optimisations! Hosting is done by me as well and for quality assurance we are monitoring all services with uptime kuma including a monthly report built again with RockPdf πŸ™‚ I find it quite funny that these 6 spikes show loading times of around one second - that's less than the loading time of an average website! All other checks finished within < 100ms (from the same data center). The spikes happen when content is updated and ProCache has to rebuild the static copy of the homepage showing how much of a difference this treasure makes thx to Ryan πŸ™‚ Site statistics are collected using Matomo to provide a great user experience without an annoying cookie banner. Consent for Youtube videos is requested on demand when a video is clicked on. Last but not least all the code is under version control and changes are pushed to the live server simply by doing a git commit (using RockMigrations deployment tools): So once the client requests a change and I'm done with the update I simply do a "git push" and GitHub does the rest and two minutes later the changes are live πŸ˜ŽπŸ§˜β€β™‚οΈ I hope you enjoyed reading and I hope you like the site as much as we do πŸ™‚ I'm happy to hear what you think and if you find something to improve please let us know! πŸ€“ PS: If you like what you see and want to push your next project to the next level I'm happy to do consulting on an hourly basis so that you can efficiently pull my 10 years of ProcessWire knowledge into your work πŸš€ Let's meet at cal.baumrock.com - always happy to see real faces instead of avatars πŸ™‚
  13. Hey @horst and @Robin S here is a real use case from today: A website mockup with transparent background. Exporting it as PNG results in 369kB: WEBP 109kB WEBP created from PNG via PW: 66kB That seems to be a 90% quality setting πŸ™‚ @Robin S is there a reason why your module converts to JPG and not PNG? I'd lose the transparency when using JPG... I guess I export PNG and use that for my website for now, but I'd still think that it would be nice to support WEBP @horst maybe you can rethink that?
  14. Thx @Tyssen I've updated that readme to point to the "new" docs: https://www.baumrock.com/en/processwire/modules/rockfrontend/docs/
  15. Where did you find this link? It's from an older version. I renamed the profiles at some point: https://github.com/baumrock/RockFrontend/tree/main/profiles
  16. Hey @Klenkes I've just been working on this again, but it's really hard to fix if I'm not able to reproduce 😞 I think the problem could be these lines in InputfieldRockPageBuilder.js: // make sure to add InputfieldStateChanged immediately after keydown // we do not intercept form.submit() because that somehow brakes the save process $(document).on("keydown", ".InputfieldRockPageBuilder input", function (e) { $(e.target).closest(".Inputfield").addClass("InputfieldStateChanged"); RockPageBuilder.changed(e); }); $(document).on("keydown", ".InputfieldRockPageBuilder textarea", function (e) { $(e.target).closest(".Inputfield").addClass("InputfieldStateChanged"); RockPageBuilder.changed(e); }); Could you try commenting these out and see if that makes a change?
  17. Sure, there are different options. https://processwire.com/api/ref/config/version-url/ Or RockFrontend: $rockfrontend->styles()->add("/your/asset.css") Which will automatically add cache busting timestamps based on filemtime. And probably many more πŸ™‚
  18. It is built for exactly the use case you have mentioned: Working on a PW website/app while content is changing on the production system and continuously pushing updates to the live system without losing data and without any downtimes. No, you can change everything. But you need to understand how things work and how they play together to not mess up anything. For example you could do a $rockmigrations->deletePage(...) and if that page is needed for anything else it would break your site. That's something that is not yet built into RockMigrations. The reason is that there are so many ways to build a website in PW that you can't really have a simple $rockmigrations->pushContentToServer(...) or something. Also we'd have to deal with different page IDs on different systems etc etc... If you are building a module, then you have to do these things in code. It has to be reusable afterall. RockMigrations has several helpers for that, for example for autoloading pageclasses that you only have to put into the right folder. For example in RockCommerce I need one root data page. I have a pageclass for that rootpage and I create that rootpage at /rockcommerce and below that page all other pages are stored, like invoices or orders etc. That's quite easy to handly as I can identify pages by their names and name collisions are theoretically possible, but very unlikely (who would have a rockcommerce page in his/her installation?!). When working on a new section of a page, for example you add a blog to your existing website, things are different. You need lots of content and you only need it once - not as a reusable module. In that case I'd build the structure with RockMigrations and then push the changes to the remote server. The remote server can either be a staging server to make sure I don't break production or to preview changes to the client while the old version is still on production and while my local laptop might be switched off. Simple changes for simple websites can be pushed to production directly. Then you can populate the pages there via GUI and once done you can do "rockshell db:pull" and you have all your content on your local DDEV! What about the images, you ask? RockMigrations will automatically download them from the remote server while you are viewing backend or frontend pages and those files are requested. Just set $config->filesOnDemand = "https://www.example.com"; You could even create all fields and templates on production and do a "rockshell db:pull" regularly if changes are one-time and don't need to be reusable. RockMigrations does not force you into any workflow here - it just offers the tools to make things easier.
  19. I'm planning a trip to Berlin in the summer and might take a train from Vienna to Prag and Dresden to Berlin. Anybody here that wants to meet up?
  20. There is a latte extension for vscode and there is an open issue: https://github.com/smuuf/vscode-latte-lang/issues/5
  21. And if yes, how do you do it? I've written a script using RockShell + RockFrontend dom tools, which is quite easy, but I'm wondering how others do that and if there are tools that already do this properly?
  22. Hi @*Most Powerful Pony!* what you are describing is indeed more complex and in such a situation you'd have to be more careful. But it's not really a drawback of RockMigrations in my opinion - it's a general team management issue just like any other merge conflicts. If I understood you correctly you are talking about a situation like this: - website X, v1.0 --- feature branch A - adds field_a v1.1a --- feature branch B - adds field_b v1.1b --- feature branch C - adds field_c v1.1c Now if anyone checks out A, then B, then C he'd had all three fields, yes. That can be a problem, I agree. The question is what you do to prevent such problems. In a classic approach you'd move back and revert migrations from branch A, then checkout B, then revert, then checkout C. But you can do the same with RockMigrations. You could for example make a DB dump of v1.0, work on branch A, then checkout B, do "rockshell db:restore" so you'd be on v1.0 and then after that restore RockShell will have applied your migrations and you'd be on v1.1b with only field_b (and no field a+c). What I'm usually doing is to have one single source of truth, which is usually the production system. Then I can do whatever I want in whatever branch and just do a "rockshell db:pull" and it will pull the production DB and apply my local migrations of my current branch. That way I also make sure that I don't get any bad surprises on deployment. But you could also use RockMigrations in a more classical way. @elabx is using it in combination with the older Migrations module, which takes care of executing migrations one by one and also provides a UI for rollbacks. That might make sense in a scenario like you are describing, still RockMigrations can be of great help for writing the migrations code itself. But don't forget that when going the classical route you basically double the development effort. Every change needs to have the corresponding rollback code as well. If that is a requirement, you can do it (even with RockMigrations). I just don't do it because I don't need it, because "rockshell db:dump" and "rockshell db:restore" is usually a lot faster than writing code for rollbacks (and not to forget test everything) πŸ™‚ I'm using DDEV and I'm checking in the DB into my repo. So checking out any commit in the history is "git checkout ... && ddev import-db -f dump.sql". That's it. But if you want to support RockMigrations I'd be happy to add support for classical workflows to RockMigrations or we can discuss any other cooperation to push ProcessWire forward on this topic πŸ™‚
  23. Thank you @Stefanowitsch for mentioning RockPageBuilder! However, it appears that what they need might differ from what RockPageBuilder offers. @FireWire eloquently highlighted this distinction recently: So, RockPageBuilder is more about helping developers to build content elements quickly and easily. These blocks enable clients to populate their websites with content seamlessly, without the need to think too much about the technical and visual aspects (because this is our job as web professionals). It's less about designing and more about managing content, which is something I love about ProcessWire and where it really shines. In RockPageBuilder the design is done in code - CSS, Less, Tailwind, UIkit, Bootstrap. You can choose whatever you like best. If you want a no-code page designer there are plenty of options out there, but RockPageBuilder is likely not your first choice πŸ™‚
Γ—
Γ—
  • Create New...