Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates

  1. Yesterday
  2. I've noticed vimeo have started to use /'s in their urls which doesn't seem to trigger the embed module. Is there a way around this? Example: https://vimeo.com/941494474/673a4bb0d4
  3. Hi @Klenkes, sorry for the issue. I've just published a new version which should fix it. Please give that a go and let me know if it's worked.
  4. For what it's worth, I switched from MySQL to MariaDB on my local dev server which is running Ubuntu 22.04. Importing a db dump that uses InnoDB is 7x faster in MariaDB. I tried making it faster in originally in MySQL by adjusting a bunch of settings without luck. Switching to MariaDB with its default settings is much faster based on my simple test. Edit: It seems the reason the speed is much faster has to do with MariaDB disabling binary logging by default while MySQL doesn't which is probably the more accurate explanation: https://dba.stackexchange.com/questions/327303/mysql-8-twenty-times-slower-than-mariadb-10-3
  5. Just to check. There is no forgotten config-dev.php around with different settings? Have you cleared out all sessions and cookies via browser dev tools?
  6. https://nativephp.com/docs/1/getting-started/introduction "NativePHP is not a GUI framework. We don't want to tell you how to build your app. You can choose whatever UI toolset makes you and your team feel most productive." "#What's in the box? NativePHP comes with a bunch of useful features out of the box, including: Window management Menu management File management Database support (SQLite) Native notifications" What can I build with NativePHP? Honestly, anything you want. The only limit is your imagination. Now for building Windows apps too: https://github.com/orgs/NativePHP/discussions/278
  7. Thanks @bernhard for being awesome again. This worked flawlessly!
  8. Hi, using a file field with the option to upload exactly one pdf file. So if i choose a new one, will the old file be deleted from server? If not, how can i force this? I am using a file field with the option to upload exactly one PDF file. If I select and upload a new file will the old file be deleted from the server? or, If not, how can I force this? No outdated files that may be indexed (for example by Google) should be accessible anymore. Any solution for this? Thank you!
  9. 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. Hey @Andi I've just pushed a "fix" for this on the latest dev. I did some research and from what I read it should not make a difference, but if at all it might be better to load styles first and then scripts, so that's what I'm doing now. The load order has always been scripts then styles. So nothing changed here in the past.
  10. @wbmnfktr I created an issue on Github for this.
  11. If I understand correctly, you want to make the connection between contract and product pages after data import. In the imported data you have a numeric ID that connects contracts to products. Can you please clarify if that numeric ID has been saved to a field on both contract (multiple IDs) and product page (single ID)? Once we know that, it would be quite easy using a small script to make the connection through a page reference field on the contract page that references one or more products.
  12. Yes, that is why we went with the page tree option. Less headache for developing. Definitely more work, but also more flexibility for the editors.
  13. Last week
  14. @ArklogicFor actual PW versions, just put your live config settings into config.php and your local development settings into config-dev.php and don‘t upload the dev config to your live site. This works quite well for small sites/teams. In config-dev.php you could use plain PHP to read from .env or add switches to reflect different stages based on a variable, flag etc.
  15. Resolved. public function init() { $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'addResources'); } public function addResources(HookEvent $event) { $page = $event->object; $this->config->styles->add($this->config->urls->SeoTextWidth . "SeoTextWidth.css"); $this->config->scripts->add($this->config->urls->SeoTextWidth . "SeoTextWidth.js"); }
  16. @ryan, Can you have a look at this, and point us into the direction how to get this into pw3 / pw4 ? Being supported /maintained by the community. Basically an auto install by providing a preconfig or .env variables.
  17. I somehow managed to miss this reply. Thank you for both of your replies, @Robin S! I did manage to get this working, with some oddities here and there that had to be worked through due to how I was checking/setting access permissions. I chose not to explicitly set permission for each and every template per role since I'm using a field that's added to the templates to determine access, so it seemed doubly difficult to do that, and my hope was that inheritance would work properly most of the time. So far that's fairly true, with occasional exceptions (ex: nested repeaters since repeaters have their own system templates). It felt a little hack'ish but I checked against the template name and if strpos() found a match to "repeater_" against $page->template->name, then I'd allow access to the edit method (add didn't cause an issue the way I had it written). I wasn't sure how else to check if a template of a page being checked for access belonged to a repeatable fieldtype.
  18. As far as I can tell, that's the way to do it. Assuming your repeater field is called 'my_repeater_field' and it contains a field called 'foo' that you want to add a make-shift markup field above, here's what you'd do: $wire->addHookAfter('InputfieldWrapper::render', function(HookEvent $event) { if(!$event->object->children->count) return; if($event->object->children[0]->name!="my_repeater_field") return; $event->return = str_replace( "<li class='Inputfield InputfieldText Inputfield_foo_repeater", " <li class='Inputfield'> <label class='InputfieldHeader'> my custom repeater markup field </label> <div class='InputfieldContent'> content goes here </div> </li> <li class='Inputfield InputfieldText Inputfield_foo_repeater", $event->return ); });
  19. Hello Bernhard, Thank you again! It was very instructive. No doubt includes are essential. I didn't know if I had to post it here or in the RockFrontend module topic. I'm converting and redesigning an old ProcessWire website for a non-profit association. It contains 3 FormBuilder forms. In _init.php, I have this code now (the same I had but I made changes so that it works with only one template): // FormBuilder if($page->template == "form-page" && $page->id == 1061) $form = $forms->render("contact"); else if($page->template == "form-page" && $page->id == 1059) $form = $forms->render("benevolat"); else if($page->template == "form-page" && $page->id == 1060) $form = $forms->render("soutien"); else $form = null; And in /site/templates/sections/main.latte, I have this line among other things: {$form|noescape} (I can"t escape again from having to use the |noescape filter...) In the old website, in _head.php and in _foot.php I have respectively: if($form) { echo $form->styles;} if($form) { echo $form->scripts; } How could something like the following work? (with the condition that $form exists or that $page->template == 'form-page')? In _init.php, // RockFrontend $rf = rockfrontend(); $rf->styles() // add the base uikit theme ->add('/site/templates/uikit/src/less/uikit.theme.less') // add default folders like /sections and /partials ->addDefaultFolders() // add FormBuilder styles on condition ->addIf($form->styles, $form) // minify on production ->minify($config->debug ? false : true); $rf->scripts() // load uikit ->add('/site/templates/uikit/dist/js/uikit.min.js', 'defer') // load custom javascript of this project ->add('/site/templates/scripts/main.js', 'defer') // add FormBuilder scripts on condition ->addIf($form->scripts, $form, 'defer') // minify on production ->minify($config->debug ? false : true);
  20. @gebeerThanks for your long reply which I am reading only now. I have other things to do right now so I'll come back on this later and try everything you said and edit this post to let you know how it goes. Edit : I have eventually managed to uninstall Process Login History by doing what @gebeersuggested (rename, then missing > remove from database). The problem persisted… I have also checked the XHR response with Firefox and got the « server error » after about 60 seconds trying to load the pages tree… I guess I won't have any answer from the host admin until next week 😞 I have no idea what else to try. I have tried everything I could think of (htaccess modifications, uninstalling modules, removing parts of my site to limit server loading…)
  21. Hi @Michael Lenaghan There is no "Mark as solution" button here as far as I know. You have to edit the post title and add "Solved" or whatever you think appropriate. Gideon
  22. A million thanks, that was indeed the problem.
  23. @froot sorry I didn't see your posts. If i understand correctly the admin pages use the admin template which is not a configurable template. You could create a settings page under the admin using the ProcessPageEdit process and then using a hook you can get that admin page to use a page in the tree, like "/settings/"; this was an old trick we used to do all the time and suggested by @Jonathan Lahijani. In terms of the general workflow for the settings factory, i just don't attempt to use images on those settings pages, but what I do is use a centralized media library to store site assets such as a logo. The logo is also tagged as such, and is additionally easily findable by the site managers and they can replace it on their own if they need to; this allows me to use all of the features of the regular page editor and images field and not have to hack it for use in Settings Factory. In SF you could create a page select that would allow selection of that media item.
  24. yes, that is what I meant! I was not even aware that that weekly newsletter is not officially from Ryan, as its sent from email address "newsletter@processwire.com" 🙂 But now checking in more details, the footer mentions its sent from Teppo Koivula. My mistake, sorry @bernhardthanks for clarifiying.
  1. Load more activity
×
×
  • Create New...