-
Posts
6,638 -
Joined
-
Last visited
-
Days Won
360
Everything posted by bernhard
-
@theoretic just to confirm.. you have set AdminThemeUikit to use the "original" style?
-
A quick backup strategy could be to setup https://processwire.com/modules/cronjob-database-backup/ to backup the database every hour (if it's not a huge site). Then at least the maximum risk should go down to the work of 1 hour. There have been several similar reports these days, but as @wbmnfktr mentioned I think they have been related to RepeaterMatrix only?! Not sure what the status of that is @adrian ? Luckily I have not encountered anything like that so far. It does not sound like that would be the case, but just to be sure... Do you have very, very much fields on that page? Then you might be hitting your server's max_input_vars limit.
-
I haven't seen this happen for over 10 years as it's a very friendly and helpful community and it's also part of our community guidelines: https://processwire.com/talk/topic/8234-community-rules-guidelines/ 😉 If you see anybody violating the rules just contact one of the moderators - no need to blame anybody upfront. Thx
-
@bernhard Thanks for all the feedback! How do I duplicate those notifications? I don't recognize what I'm seeing in your screenshot. I tried ProcessWire.alert() and ProcessWire.confirm() but both are styling correctly. Hi @ryan these are just regular UIkit notifications from the Notification component: https://getuikit.com/docs/notification - Just copy this into the console of your devtools: UIkit.notification({ message: 'my-message!', status: 'primary', pos: 'top-right', timeout: 5000 }); UIkit.notification({message: 'Danger message…', status: 'danger'}); Either of the custom CSS options should enable this. Ryan, this could be the answer to all of my/our questions. The theme was marketed as being easily customisable by changing just a few css variables and I think you did a good job, but as some of the comments show the new style might be missing some. Of course anybody can look into the 3100+ lines CSS file and find the right spot to tweak. But there might be several spots that one has to override. It might be necessary to add !important to make it work. And one might forget about edge cases like RepeaterMatrix, RockPageBuilder, whatsoever. I think some main design decisions should be taken care of the style, not every developer reinventing the wheel over and over again and fixing the same issues over and over again. For the buttons it seems to be quite easy. We'd just need a CSS variable for this: .ui-button, .uk-button, .ui-button.ui-state-default, .ui-button.ui-state-hover, .pw .tox-dialog .tox-button, .pw .vex-dialog-button, .pw .vex.vex-theme-default .vex-dialog-button { border-radius: 9px; } Line 2649 of admin.css I think this is also likely a good use case for the custom CSS options. I disagree for the reasons mentioned above and I ask you 3 guys to rethink that to offer something like this: --border-radius: 10px; --input-border-radius: var(--border-radius); --button-border-radius: var(--border-radius); This means if someone wants all input/button elements have the same border radius, let's say 20px, then all he/she has to do is this: --border-radius: 20px; And if he/she wanted something like the style currently uses it would be something like this: --input-border-radius: 0; --button-border-radius: 99999px; Just tried, but it works for me. Are you missing the leading "/" before "site/", i.e. "/site/" ? Thx! Sorry, my bad! I forgot I had a very restrictive .htaccess in place that blocked access to that css file 🙂 I tried both site and /site and both did not work. But now both versions do! I don't usually like having to do extra file_exists() checks, but maybe it makes sense here. Perhaps the admin custom CSS file could be pre-populated with a /site/templates/styles/admin.css or something like that so that it would be the standard it uses, unless you opt to change it to something else. Hmmm. Good point. Not sure. I think it would make things easier to have a common standard, like having a default /site/templates/styles/admin.css for example with just a few comments pointing to the example files at https://github.com/processwire/processwire/tree/dev/wire/modules/AdminTheme/AdminThemeUikit/themes/default/examples --- Another problem I just realised: My login screen is always the new style. This toggle seems to have no effect? It's not .htaccess this time... Why choose a color that isn't readable? For anything that has customizable colors, there's a responsibility to choose an appropriate color. In this case, unless you disable dark mode, you'll want to choose a color that works for both. The three predefined color options are there as good examples. Maybe we'll add separate main color choices for light and dark mode, I'm not sure, but it will still be the responsibility of the person configuring the color to choose something that is legible. Because it's the primary color of the CI. That's the whole point for having the primary color customisable, no? The backend should match the main color of the company and that's often a color that is dark to have a good contrast to white. It's not a solution to simply choose another color to make it work on dark mode 😞 Sure. We're already doing it for the PW logo, so makes sense we should for custom SVG logos as well. Great, thx! Most likely it's something that PW doesn't use, so it isn't styled, but I'm sure it can be. I think we do use uk-alert boxes, but always of a type like "primary" or "warning" or "danger", etc. So maybe we just need to add a style for alerts that aren't of a specific type. Thx. This is the code that it uses: <div class="uk-alert"> ATTENTION - RockMigrations is installed on this system. You can apply changes in the GUI as usual but if any settings are set via code in a migration file they will be overwritten on the next migration cycle! </div>
-
As we have a new core admin style now I guess there is no need to keep AdminStyleRock alive any more, so I'm going to archive it sooner or later. Any different opinions? https://processwire.com/talk/topic/31242-new-blog-admin-theme-redesign/ As the new theme introduces a lot of issues I might keep AdminStyleRock alive. We'll see how things evolve!
-
Hey @ryan @diogo @jploch thx for your work on this! I have some questions: 1) UIkit notifications seem to not use the theme's styling: 1.b) Is there a reason why primary buttons are black and not in the primary color? 2) Could you please add an option to make the button's border radius customisable? 3) Could you please add an option to make all input's border radius customisable? Ideally both would use the same setting by default but could be also set differently. This was one of the changes proposed by @Chris-PW when we were working on a new admin style and I think it makes sense to have everything that can take user input (<input> <textarea> <button> etc) have some rounded borders. We already have lots of lots of lines in the admin to help with grouping content, wrapping inputfields etc. and all those lines add up. Having all clickable elements look slightly different from everything else (but identical on their own) helps a lot in my opinion. 4) Is there a reason why <select>s have white background and regular inputs have a light grey? 5) Is there an option to disable the new toggles and get back to good old checkboxes? See https://axesslab.com/toggles-suck/ Even if one prefered toggles over checkboxes in general, I think there are some situations where they are absolutely counterproductive, for example here: 6) I tried do add the file site/templates/admin.css with the following content: :root { --border-color: var(--main-background); /* --inputs-background: var(--blocks-background); */ } I then put both "site/templates/admin.css" and "/site/templates/admin.css" in the AdminThemeUikit config for "Custom CSS File", but it had no effect. Strangely when I put "wire/modules/AdminTheme/AdminThemeUikit/themes/default/examples/borderless.css" it worked! I also tried with this content: div { border: 1px solid red; } Still no luck. 7) Would it be possible to have the admin theme load one CSS file by default. Similar to what we know from /site/ready.php it is often so much nicer to just place a file in a predefined location than to have to update a module's config somewhere. This might not sound like a lot to do, but when working with migrations and automated deployment workflows these things get more tedious, because you can't simply change the module config, you have to migrate these changes and then commit them. Also a predefined location reduces the risk of typos, of missing leading slashes, etc. 8 ) Where to report bugs/issues/requests? In the PW issues repo? Here in this thread? Somewhere else? 9) When editing a page in a modal (just add &modal=1 to any page edit form) there is a lot of unused space at the top: 10) On the page tree I think it is ok to have the action items text-only in this case (though I'd probably prefer the old style here): But on the trash we have some text followed by the action buttons and there this text-only style is really not good imho: 11) +1 for this: I'm using #0a2b99 for the primary color and links are near to not readable in dark mode: 12) @ryan As you can see in the screenshot above when using dark mode I'd probably want to change the logo to a white version. If that image were an <svg> this would be quite easy to do with CSS, but at the moment it is using <img src='...'> Could you probably update the theme to make it inject SVG markup for the logo directly? 13) Regular UIkit <div class='uk-alert'> are not styled properly (they use the default uikit blueish), which is even worse in dark mode: Thx!
- 179 replies
-
- 12
-
-
What do you mean?
-
Hey @Bia welcome to the forum. I might be wrong but to me it sounds like you still have a wrong assumption what ProcessWire is and how it works. ProcessWire is a development tool to build websites or anything similar. You can not only build websites with it but also intranet applications, backends for single page applications, etc... That means whoever built your website did it THEIR way. Nobody else can know how the website that you are looking at works under the hood. That means if you really want/need to change anything on your website there is a 99% chance that you need to change some code for this. That also means you need access to the files of your website. That also means that you might need to understand how your website is deployed to the server. Your developer might have just copied all files to your server. But he/she might have setup an automated deployment pipeline. It also means that it would be wise to first test all your changes locally before you push them to production. Otherwise you risk to break your site and then it might be down until someone can fix it. If you don't have someone for that at hand you risk to have a very bad time with some very uncomfortable questions 😉 But of course it also depends on the type of website you are working on. If it's not important and does not have lot of traffic this might not be a big deal... Who knows. I think in your situation it would be the best to find someone experienced to have a look at your project for maybe an hour or two that can explain to you how everything works, how it is setup and what to expect in terms of future maintenance or development and hosting. I'm not talking about how it works in detail but to get the big picture. Then you can decide how to proceed. If you want me to do that you can write me a PM or request a meeting at https://www.baumrock.com/en/contact/. There are probably cheaper options though. You can also ask for help in the jobs board or, of course you can always ask questions in the forum. It's a friendly community and answers are free, but while usually you don't wait long for answers it would probably not be the quickest way in your case. Having said all the above to answer your question: If that form is built in code you'd have to open an IDE and search for the term "Culoare:" or "Colored" or "White" in your codebase. Then you might find the file that is responsible for the dropdown. If you don't find anything in code then it means that your developer used some kind of form builder and the data is stored in the database, not in code. Hope that helps 🙂
-
*NOT 🤣
-
Hey @HMCB the module does not offer a plug&play calendar for the frontend. Every frontend is different. Every project has different needs. One might need a month view, another project might need a list view or a weekly schedule... All these needs have been solved by libraries like https://fullcalendar.io/docs/initialize-globals so there is no need or justification for RockCalendar to reinvent the wheel. The cost/benefit calculation would clearly be negative here. But for everything behind the scenes (the backend) we have a common ground (the PW admin interface), so there you can save a lot of time and effort with RockCalendar. RockCalendar should provide all the necessary helpers though to make implementing any calendar (for example one might prefer the toast ui calendar https://ui.toast.com/tui-calendar) as easy as it can get. If you are missing anything let me know and I'll try to add it.
-
Yeah, that's definitely on the Roadmap, but I have other priorities at the moment.
-
RockLite - Basic MailerLite Integration Module for ProcessWire
bernhard replied to bernhard's topic in Modules/Plugins
I think you should also be able to send other field's data to MailerLite: https://github.com/baumrock/RockLite/blob/ce0e818cf4b7f9e5ef4cf6a0ee1244f6c291ab92/API.php#L44-L51 -
I've read several times that slow page loads came from lots of pages being loaded into memory when loading the page. This might be due to a poorly configured page reference field (eg a selectbox with thousands of pages) or maybe another module with a totally different purpose. I think you are right that an autocomplete field should not cause any issues. I'd try to look into the debug tools first and see how many pages are loaded on that initial iframe request. You should see that in the bottom right corner if debug mode is on.
-
RockShell - a ProcessWire Commandline Companion ⌨️
bernhard replied to bernhard's topic in Modules/Plugins
I'm not sure, but I think so and that might be a good thing to add. Can you try to modify the rock.php file. There I catch any exceptions and only write the ->getMessage() output to the console. If you remove the try/catch, do you get more helpful output? -
RockShell - a ProcessWire Commandline Companion ⌨️
bernhard replied to bernhard's topic in Modules/Plugins
Hey @Jonathan Lahijani what you provide to me might be even more vague than what RockShell provided to you 😉 So I don't have any idea so far. What is your exception that you see? What is that one line that you get from RockShell? -
[SOLVED] Define blocks once, share across RPB fields
bernhard replied to FireWire's topic in RockPageBuilder
I don't think it's very elegant, but it works ^^ I think you can also use the GUI and click on "use one of the existing blocks" after clicking on the plus to create a new block, no? -
[SOLVED] Define blocks once, share across RPB fields
bernhard replied to FireWire's topic in RockPageBuilder
Hi @FireWire to "clone" or "mirror" a block it just needs an empty (!) php file with the same name. /site/templates/RockPageBuilder/blocks/Foo/Foo.php (all code) /site/templates/RockPageBuilder/blocks2/Foo/Foo.php (empty) -
+1 Docs in markdown have been working great for me. All my module docs are markdown, so they are part of the repo (could be another repo as well, as images for example bloat the module code, which is not ideal). I'm using RockFrontend's dom tools to enhance the markdown docs with some special features. That makes it possible to have working forms on my docs for RockForms, for example: https://www.baumrock.com/en/processwire/modules/rockforms/docs/ ## Working Example In this example we will build the following form. [rockforms=Quickstart] Or another example is rendering code blocks and showing copy buttons. In markdown it's just a plain code example, on the HTML page it's an interactive element with nice labels etc: ## Example This example shows how you can make every required field's label bold and add the note `optional` to every field that is not required. Note that NetteForms uses the terms `label` and `caption` for field labels. [rockforms=Optional] `label: /site/ready.php` ```php $wire->addHookBefore( "RockForms::renderField", function (HookEvent $event) { // get the field that is rendered // in netteforms its called "control" $control = $event->arguments(1); // make required fields bold if ($control->isRequired()) { $control->getLabelPrototype()->addClass('uk-text-bold'); } // add optional note if not required else { $renderer = $event->arguments(0); $label = $control->label->getText() . " <small>(optional)</small>"; $control->setCaption($renderer->html($label)); } } ); ```
-
solved ajax, $pages->find, current language results
bernhard replied to olafgleba's topic in Multi-Language Support
If I'm not missing something it should be easy: The ajax request will return data in the language that the request was sent to. A request to example.com/whatever would return english A request to example.com/de/was-auch-immer would return german You just have to make sure to send the request to the correct endpoint. -
It still feels crazy that we can talk to computers now, but it has already had a huge impact on my life. Not only my dev life. It's also still crazy to call given results an "idea", but I guess we don't have better words for it so far... If you liked the experience try https://www.cursor.com/ or https://windsurf.com/. I started with cursor, then gave windsurf a try for some weeks. I switched back to cursor, because cursor tab so so extremely well at predicting what I want to do next, that I feel it makes me extremely faster all the time while I'm working. Windsurf on the other hand felt better when asking it to create files, read the codebase, have a chat or use it for non-dev questions (like a web search or some other crazy tasks). While both are already next level compared to copy-pasting things to chatgpt, because they know "everything" about your codebase, I think cursor tab is a different beast. It's there for you all the time. You just type three letters and it predicts 3 lines of code. It's incredible powerful in my opinion and it's also great and fun to learn. Because sometimes it predicts new patterns and then you can look that pattern up and if it's a good pattern to know and use you can keep it in your mind and start using it on your own. If you use AI only actively when asking specific questions you miss out on this.
-
Submenus in admin menu not created or working correctly
bernhard replied to douwe's topic in Module/Plugin Development
I'm not sure in which cases specifically, but the menu sometimes needs a cookie/cache reset as well. I'm always using Tracy Debugger for that: -
Ok I just had that exact need and realised that once you realise it's too late to add a hook, because it will not work for the past, only for future logins ^^ So I support this request 😄 And similar to what @nbcommunication wrote it might be helpful to have two different timestamps: one for the last manual login (done by a real user), one for the last API login (via code like forceLogin() or such)
-
Hi @hellerdruck, how do you suggest I help with an issue that I cannot reproduce?
-
Weekly update – 8 March 2024 – New invoices site profile
bernhard replied to ryan's topic in News & Announcements
It is a solution, yes. A good solution? I don't think so. The problem that you are talking about is why I built RockMigrations. ProcessWire makes building all kinds of inputs/apps/guis/relations relatively simple. The drawback is that all these setups that are created via user input (and not via code) are one-off solutions. That means they only work once for this specific project. If you want to make them reusable you have two options: Create a site profile (with all its drawbacks, as mentioned above) Create code that does all the setup that you usually do by hand Option 2 is usually a LOT of work. That's where RockMigrations shines. Instead of building everything with your mouse you build everything with migration files. Once you know how to use it is is not a lot slower. In fact I think if you take the whole picture into account it is a lot faster (think of reverting changes, refactoring, deploying, testing, etc). That was some background. Back to your situation: You can use the site profile on a subdomain. If you need date from the other system you can use bootstrapping or use multi-instance features of PW. It might be easy. It might not. What you can also do is install the site profile and then move things over to your new site step by step. -
Weekly update – 8 March 2024 – New invoices site profile
bernhard replied to ryan's topic in News & Announcements
@hansv I don't think that it is possible to use site profiles on existing sites. That's the problem with site profiles compared to modules. Modules can be installed on any website at any time. Site profiles are a starting point to get a new site up and running quickly and to have 100% freedom of what happens after that. That means site profiles have the benefit that you are not locked to the module approach. You can build whatever you want explicitly for your use case. A module on the other hand is always something that many projects might share and therefore all features that you add will also be added to any projects that the module is installed in.