-
Posts
66 -
Joined
-
Days Won
1
Everything posted by Andi
-
Hey @bernhard. I was actually wondering about that a few weeks ago. I was working on a dev server as admin setting up templates, and another user with limited privileges was editing content somewhere else on the site. So no live site, but several people accessing at the same time. So I was wondering rather, would it currently be possible to somehow limit LiveReload to certain users or groups?
-
Sorry to hear that @netcarver- glad you found a solution. One thing I would strongly suggest when running Manjaro on a production machine is to choose BTRFS as file system during installation, and then make sure timeshift-autosnap-manjaro is installed. This way you get an automatic BTRFS snapshot of your system files on every update, that you can restore or directly boot into from GRUB.
-
+1 for Manjaro from me ? I decided to make the jump to Linux again during Covid, with Windows 7 reaching EOL. Did some distro-hopping for a while and landed on Manjaro Cinnamon Community Edition. You basically get the stability of Mint with the rolling release model of the Manjaro / Arch ecosystem with this one. Manjaro Gnome is very polished, but during my time with it I got really annoyed with extensions breaking on every update, and some other qol issues. Cinnamon is just solid as a rock. Nemo is a fantastic file manager with tons of extensions, ddev-bin from the AUR works right out of the box. If there's issues with system updates, you pretty much always find the answers in the official announcements. Also the Manjaro forums and Arch Wiki are great places to find help on pretty much anything. Also, if you're doing a lot of RAW photo editing, darktable is a great option once you get past the initial confusion. It runs ten times faster than LR and I couldn't imagine ever going back at this point. Lots of options! Good luck and and yay for FOSS! ? P.S. Attaching a screenshot with Code OSS and DDEV running on a dual head setup. Don't forget you can CSS your actual desktop environment ?
-
Awesome@Juergen, really nice work ? I've added a working demonstration of a customized security question using the new compareTexts validator to the PicoWire site profile If you want to add a customized CAPTCHA question to your form, disable CAPTCHA in the module configuration, and then add a custom text input with the new validator set as a rule // add security question field $question = new \FrontendForms\InputText("question"); $question->setLabel("Security question: What color is a green apple?"); $question->setRule("required")->setCustomMessage("Please answer the security question"); $question->setRule('compareTexts', ["green", "it's green", "the color green"])->setCustomMessage("Answer is not correct!"); $question->setSuccessMessage("Answer is correct!"); $form->add($question); This way you can completely customize your field like any other input, including error and success messages ?
-
site-profile PicoWire - A simple site profile using Pico CSS
Andi replied to Andi's topic in Themes and Profiles
- 1 reply
-
- 3
-
site-profile PicoWire - A simple site profile using Pico CSS
Andi posted a topic in Themes and Profiles
Hey there, for the last couple days I've been playing around with Pico CSS after reading about it in @Jonathan Lahijani's post over here I'm really liking the framework and thought it would be a great fit for smaller PW Projects, so I've put together a small site profile as a starting point for people who'd like to try it out. This is by no means a production ready site, so just be aware of that when you install it somewhere ? @Juergen has generously offered to include native Pico support in his FrontendForms Module and already implemented the core functionality in his latest update, so I included a very basic contact form showcasing the new Pico2 framework option on the contact page. Also, I've added a few other 3rd-party modules in the download, these are currently @bernhard's awesome RockFrontend, because I don't think I could live without Latte ever again @adrian's Tracy Debugger because it's the first thing I install on every project @Robin S's really handy MinimalFieldset for the hero section repeater I've never actually released a site profile here so I hope it's ok to ship with these modules preinstalled. If not please drop me a line and I'll change that asap. Unfortunately I do not have a GitHub account so I'll attach a .zip file for now. Actually not 100% sure about the official procedure here ? If you have any suggestions for improvements, or if you encounter any problems during installation, feel free to leave a comment here. Also, people who actually know JS please don't hate me for the implementation of the theme switcher. At least it's working, and it actually doesn't flicker on page load like it does on the official Pico website ? All the best from Regensburg and if you're in Germany, happy holiday! Download: site-picowire-v4.zip- 1 reply
-
- 6
-
Hey @MarkE, I know the feeling ? If you want to make absolutely sure, I'd suggest making a Duplicator copy of the entire site, install it on your live environment, using a subdomain and a different database.. Then update that site and see if it fixes things.. Just don't get confused with the different installations ?
-
Hey @MarkE, maybe try running the latest PW dev version on your live rig, I seem to remember something being patched about page classes in one of the latest updates. If I can find it, I'll post it here. Here's the issue... I remember having trouble with that on a live setup a few weeks back ? https://github.com/processwire/processwire-issues/issues/1862
-
Haha, really cool @Juergen, but wasn't it supposed to be weekend? ? Working nicely over here, and now configuration really is a breeze! One little thing I've come across during testing, if I disable HTML5 validation and just submit an empty form, the success message gets printed below the error (see Screenshot 1). Steps to reproduce: Framework -> Pico2 Field code: // disable html5 validation $form->setHtml5Validation(false); // add name field $name = new \FrontendForms\InputText('name'); $name->setAttribute("placeholder", "Name"); $name->setRule('required')->setCustomMessage('Please enter your name'); $name->setSuccessMessage('Looking good!'); $form->add($name); And the resulting HTML, after submitting an empty form: <input id="contactform-name" name="contactform-name" type="text" class="input input-error" placeholder="Name" required="" aria-invalid="true" aria-errormessage="contactform-name-errormsg"> <small class="error" id="contactform-name-errormsg">Please enter your name</small> <small class="valid">Looking good!</small> When entering a value, everything's working as expected (see Screenshot 2). Really glad you like Pico! Just found out about it myself a few days ago in this post by @Jonathan Lahijani and I think it 's going to make a great fit for smaller PW projects. All the best and have a nice weekend, coding or otherwise ?
-
Hi @Juergen, I'm basically trying to get FrontendForms to play along nicely with Pico CSS, which I've recently come to love. This is more or less what I'm trying to achieve (from the official documentation) <!-- validation passed --> <input ... aria-invalid="false" aria-describedby="valid-helper" ...> <small id="valid-helper">Looks good!</small> <!-- validation failed --> <input ... aria-invalid="true" aria-describedby="invalid-helper" ...> <small id="invalid-helper">Please provide a valid value!</small> Not sure about the actual standard here, though.. Maybe an option to add attributes to valid/invalid input fields could generally be helpful? Beste GrΓΌΓe and many thanks! And good luck with the hook issue, I'll keep playing around on my end and see if I can find anything.
-
Hey @Juergen, thanks for your answer. Setting the tags manually per field works fine for now! When playing around with some of the example code earlier I noticed that none of the hooks from the docs seemed to catch on. I thought that had something to do with my setup here somehow.. But this is already very helpful ? On another topic, is there a way to add an attribute to a field that has an error? After running through validation these classes are being added to the input field <input ... class="input input-error" ...> If I'd like to add say a <input ... class="input input-error" aria-invalid="true" ...> Would that be possible or would I need to do it via hook as well? Many thanks again!!
-
Hey @Juergen, trying this out for the first time here, really cool module! I'm wondering is there a way to change or remove the wrapper for error messages? Somewhat similar to $form->useInputWrapper(false); If try to add $name->setRule('required')->setCustomMessage('Please enter your name'); $name->getErrorMessage()->prepend('<small>')->append('</small>'); I'm getting <small> <p class="error">Please enter your name</p> </small> So basically I'm trying to ditch the <p class="error"> tag for something different. Is that currently possible or would I have to fiddle with the returned string in some way? Thanks in advance and all the best from Regensburg!
-
Thanks for the insights @bernhard, so about the loading order That's the part I was wondering about, since it used to be the other way around in earlier version of RF, as far as I remember. I was wondering if that was an intentional change. Just autoloading the UIKit CSS and JS files (without defer) in the current build gives me pretty bad FOUC and Firefox complaining If I reverse the order by disabling autoload and rendering the assets manually those Firefox warnings disappear, and I feel like the pages render a lot smoother in FF. As for other libs I'm using on a regular basis, at least Leaflet is pretty specific about the loading order of CSS and JS, see here https://leafletjs.com/examples/quick-start/ But I guess that too could be handled via the "defer" method you described earlier. Just need to keep it in mind ?
-
Hey @bernhard, just updated a site to Rockfrontend 3.13.1 and noticed that auto-loading assets via $rockfrontend->styles()->add('foo.css'); $rockfrontend->scripts()->add('bar.js'); now has the order reversed in the generated markup. <script src='bar.js?m=1712642262'></script> <link href='foo.css?m=1713850912' rel='stylesheet'> Which in case of using UIKit is probably not ideal, since in my understanding the CSS should be loaded before the JS. Can you reproduce this or is something messed up on my part? Also, on a live site and with debug mode off, RF still renders a tag <script>var RockFrontend = {"isDDEV":false}</script> in the html head, wonder if that is necessary or what the purpose of that could be. Any pointers here? Not using RockFrontend.js if that's related in any way. Greetings to Austria and thanks in advance! ?
-
Awesome news, can't wait to try this. Thank you guys for the effort!!
-
Somehow i feel like getPath is doing it's thing correctly..., It's supposed to return false if the path is not valid, or am I getting confused here? ? But in AssetsArray.php -> addAll(), there seems to be a check missing for $path. If I change that to public function addAll($path, $suffix = '', $levels = 2, $ext = ['js']) { /** @var RockFrontend $rf */ $rf = $this->wire('modules')->get('RockFrontend'); bd($path, 'before'); $path = $rf->getPath($path); bd($path, 'after'); if (!$path) return; // ******* <-- add this line ********* $files = $this->wire->files->find($path, [ 'recursive' => $levels, 'extensions' => $ext, ]); foreach ($files as $f) $this->add($f, $suffix); return $this; } The errors are gone... Although I'm not quite sure about what to return there ?
-
So, back on this. If I create an empty folder "site/templates/layouts", there's only two errors coming up.. So I guess for the 3 directories that do not exist, instead of not doing anything, the script somehow falls back to trying to look up files in the server root '/site/templates/layouts' <-- does not exist, error 1 '/site/templates/sections' <-- exists '/site/templates/partials' <-- exists '/site/assets/RockMatrix' <-- does not exist, error 2 '/site/assets/RockPageBuilder' <-- does not exist, error 3 Let me know if you need anything else and thanks again! RF is really fantastic already, and loving the new features.
-
Error is still there on 2.1.10 unfortunately.. Here's the bd.. I need to run now but I'll happily provide more information later today. '/home/sites/XXXXXXXXX/public/site/templates/site/templates/layouts' '/home/sites/XXXXXXXXX/public/site/assets/site/templates/layouts' '/home/sites/XXXXXXXXX/public/site/templates/layouts' '/home/sites/XXXXXXXXX/public/site/templates/site/templates/sections' '/home/sites/XXXXXXXXX/public/site/assets/site/templates/sections' '/home/sites/XXXXXXXXX/public/site/templates/sections' '/home/sites/XXXXXXXXX/public/site/templates/site/templates/partials' '/home/sites/XXXXXXXXX/public/site/assets/site/templates/partials' '/home/sites/XXXXXXXXX/public/site/templates/partials' '/home/sites/XXXXXXXXX/public/site/templates/site/assets/RockMatrix' '/home/sites/XXXXXXXXX/public/site/assets/site/assets/RockMatrix' '/home/sites/XXXXXXXXX/public/site/assets/RockMatrix' '/home/sites/XXXXXXXXX/public/site/templates/site/assets/RockPageBuilder' '/home/sites/XXXXXXXXX/public/site/assets/site/assets/RockPageBuilder' '/home/sites/XXXXXXXXX/public/site/assets/RockPageBuilder' Thanks a bunch!
-
before '/site/templates/layouts' after false before '/site/templates/sections' after '/home/sites/XXXXXXX/public/site/templates/sections/' before '/site/templates/partials' after '/home/sites/XXXXXXX/public/site/templates/partials/' before '/site/assets/RockMatrix' after false before '/site/assets/RockPageBuilder' after false
-
Ok so a little more info.. It seems RF is trying to add styles from StylesArray->addAll("/site/templates/layouts") Although I'm currently not using layouts on the site. Then also from StylesArray->addAll("/site/assets/RockMatrix") and StylesArray->addAll("/site/assets/RockPageBuilder") which I don't have installed on this setup, maybe that helps...
-
Hey and thanks. So that gives me 5 dumps, 3 of which look similar to this one array 0 => array 'file' => '/site/modules/RockFrontend/AssetsArray.php:69' 'call' => 'WireFileTools $files->find("/", [ 2, array(2) ])' <--- this seems to be causing trouble 1 => array 'file' => '/site/modules/RockFrontend/StylesArray.php:28' 'call' => 'StylesArray->addAll(false, "", 2, [ 'css', 'less' ])' 2 => array 'file' => '/site/modules/RockFrontend/RockFrontend.module.php:513' 'call' => 'StylesArray->addAll("/site/templates/layouts")' 3 => array 'file' => '/site/modules/RockFrontend/RockFrontend.module.php:266' 'call' => '$rockfrontend->autoload(Page $obj)' 4 => array 'file' => '/wire/modules/Process/ProcessPageView.module:184' 'call' => 'Page $settings->render()' 5 => array 'file' => '/wire/modules/Process/ProcessPageView.module:114' 'call' => 'ProcessPageView $process->renderPage(Page $obj, PagesRequest $obj)' 6 => array 'file' => '/index.php:55' 'call' => 'ProcessPageView $process->execute([ true ])' The other ones look like this 0 => array 'file' => '/site/modules/RockFrontend/AssetsArray.php:69' 'call' => 'WireFileTools $files->find("/home/sites/XXXXX/web/XXXXXX/public/site/templates/sections/", [ 2, array(2) ])' ... So somehow AssetsArray.php seems to be looking for something in the server root, although I have no idea what exactly, and why ? I'll investigate further.. Many thanks for the pointers @bernhard
-
Hey @bernhard, after deploying from ddev to a live server Tracy is giving me 3 errors per page load (frontend only) like this: PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/sites/XXXXXXXXXXXX/:/tmp/:/dev/:/usr/share/php/:/etc/ssl/certs/:/usr/lib64/php8.0/bin/) in .../XXXXXXXXXXXXXX/public/wire/core/WireFileTools.php:765 I wasn't even sure if Rockfrontend was the culprit here, but I checked two versions. On 2.0.7 Tracy gave me the error twice, while on 2.1.5 it's three times per page.. We're on a shared hosting plan with this project, not sure how to go about this.. Any idea what could be going on there?
-
Hey @kaz, in /site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.module try changing line 193 f. if( ((string) round($lat, $precision)) != ((string) round($this->defaultLat, $precision)) || ((string) round($lng, $precision)) != ((string) round($this->defaultLng, $precision))) { to if( ((string) round(floatval($lat), $precision)) != ((string) round(floatval($this->defaultLat), $precision)) || ((string) round(floatval($lng), $precision)) != ((string) round(floatval($this->defaultLng), $precision))) { that's hotfixing the issue over here. Don't know about the rest of the module, but I haven't gotten other errors so far.