-
Posts
1,303 -
Joined
-
Last visited
-
Days Won
16
Everything posted by elabx
-
Module Development: Inline Frontend Applications?
elabx replied to Inxentas's topic in General Support
I think you meant to tag @Inxentas ?? I'm a big fan of both of these libraries and I also think they match really well (specifically htmx in this regard) with ProcessWire's existing PHP API, the Inputfield objects, for example. -
Module Development: Inline Frontend Applications?
elabx replied to Inxentas's topic in General Support
I think there is no consensus right now about this and indeed pretty much all the asynchronous interactions you see on the backend are powered by jQuery. I'd say go with Vue if that is what you feel most comfortable with. -
Support page for module. https://github.com/elabx/FormBuilderProcessorTripleseat
-
My experiences with terrible performance with MySQL most of the time have to with the indexes being absent or in need of rebuilt.
-
This sort of thing sometimes happen to me when Tracy Debugger is on, and I get an unexpected warning from some random module that messes up any ajax response by errors appended or prepended to it. Maybe you could take a look in the Network tab to see what you got in the pagination response?
-
Ok got it!! I understand it all a lot better now, thanks!
-
With this I mean edits in a CKEditor, or added a repeater item that update some content in the form of a list. Is "npm run build" ran after updating this content? Do this updated trigger a "rebuild workflow" (for example for Vercel) so that the site is completely statically generated?
-
Very very very interesting!!! @flydev Really appreciate your time put into this answer. The running SSR app generates it's own static stuff if the update in the content requires it, am I assessing this right? I'd love to test an example! Let me know if also I could be of any help.
-
Don't mind, come back as many times with as many doubts as you have. Yes there are amazing modules put out by the community!
-
? Sorry for the lack of clarity! What I meant was, how to setup a development environment using vite, but assuming the development will be along the normal PHP server rendered website, with webserver+php. So, I'd love to know if it's possible to be able to have autorefresh in local development, or auto build of the static assets on watch in this "traditional" setup. I mentioned Wordpress because I feel is common to find already existing examples using Wordpress, which I've found to be a good starting point to adapting it to ProcessWire. Sounds exciting! Your opinion also intrigues me! haha. I do have enjoyed working with more frontend tooling, it used to be a bit more painful. But it "clicked" on me when i built that small js widget I mention. A couple questions: How do you deploy your SSR projects? Do you use something like vercel/netlify/cloudflarepages? I feel this hosting solutions are a nice reason to go SSR? Do you deploy processwire somewhere to have online editors and if so, how do editors handle update/preview? Do you use FormBuilder? And if so, do you use it with this SSR rendered approach? Thanks for this effort and your time answering!
-
I've used in in a couple projects and it's the "npm build thingy" (sorry i don't even know it's exact classification!) that has given me less pain points. One for a "js widget" built in Svelte (using PW as an endpoint only) and another one for a simple static website with just uikit loaded as dependency (no PW). So both very small projects, but sort of different in their purpose and both experiences were swift to get it to work! So yeah, I do like Vite haha, I feel it's quickly turning into my goto thing as far as frontend tooling goes, which used to be close to non existent. Off-topic request: It'd be rad if you could point to a repo (maybe wordpress example that could be adapted?) with a Vite setup with the regular rendering pipeline of ProcessWire, setting up the proxy for the dev server, whatever other nice thingy could be done, etc.
-
I don't think there's any shame in mentioning it publicly, or maybe just do it directly in the modules support's thread.
-
This part doesn't seem like an easy thing to refactor. How would a template file be split accorrding to template regions? It'd require some sort of cached template files created from the "template regions split" itself? Throwing this questions in the open, not specifically to Ryan. I think fragments in Blade "suffers" from the same issue in the sense that it takes the performance hit of rendering the whole template. https://github.com/laravel/framework/pull/44774 at least that's what I get from from skimming the issue.
-
You can take a look into the Template configuration, under Setup > Templates, and search for the template name of the page you want to configure to display an icon in the page tree. Now, in the template configuration, search for the Icon option, it might be closed down so search a bit for it, in most recent ProcessWire version it's placed in the initial tab.
-
How to setup Composer and use external libraries in ProcessWire
elabx replied to MoritzLost's topic in Tutorials
Not sure if this has been mentioned?? https://github.com/uiii/processwire Not sure who the user is though to quote, but I guess this is an approach using plugins instead of post-install-cmd?? The actual composer plugin: https://github.com/uiii/pw-core -
I kinda tried this and gave up lol but here's what I found: You'd probably start with the CommentFormCustom class: https://github.com/processwire/processwire/blob/master/wire/modules/Fieldtype/FieldtypeComments/CommentFormCustom.php The first comments have a little bit on how these could be used. I THINK, that something not covered is upadting the processing of the comment, so my guess is that you could implement your own "CommentFormMillipedia" for example, extending CommentForm just like CommentFormCustom, and override the processInput method, so you could process additional stuff, aside from the form fields. Although from reading the code you'd probably have to copy the whole FieldytpeComment module due to the way ComentFormCustom class is loaded. To be honest it was a bit suprised to see the comment form is not built with the Inputfields API! Maybe to allow more simplicity on the rendering?
-
I also sort of have this scenario and decided to use separate Time fields to indicate start and end time of each occurrence. I just have to assume that the occurrences have the same time.
-
Selector query performance in Fieldtype inheriting FieldtypeMulti
elabx replied to elabx's topic in Module/Plugin Development
So what I did to remove the null checks was overriding the isEmptyValue() method like: public function isEmptyValue(Field $field, $value) { return true; } I am going to guess this shouldn't be just like this lol I ended up with a query like this, which also does seem faster: SELECT pages.id,pages.parent_id,pages.templates_id FROM `pages` JOIN field_event_recurring_dates AS field_event_recurring_dates ON field_event_recurring_dates.pages_id=pages.id AND (((field_event_recurring_dates.data>='2023-03-12 00:00:00' ) )) JOIN field_event_recurring_dates AS field_event_recurring_dates1 ON field_event_recurring_dates1.pages_id=pages.id AND (((field_event_recurring_dates1.data<='2023-04-11 19:52:53' ) )) WHERE (pages.templates_id=50) AND (pages.status<1024) GROUP BY pages.id -- [117.7ms] I see the selector now throws an exception when putting a blank value, I'll guess it has to do with the simplistich approach in the override laid done above. I will dig into how to properly override the isEmptyValue() for my case., getting some hints in FieldtypeTime. Thanks again for the help! -
Hey crew, this is in pre-elease by the way:
-
best way to store and cache default/common pages
elabx replied to palacios000's topic in General Support
If ProCache is on, you will get a static file instead of reaching PHP, so any "dynamic find()" that maybe changes over time, or is randomized, won't be really visible as you'll be seeing the version that exists in the static cache and won't change, until its built again.- 1 reply
-
- 1
-
Selector query performance in Fieldtype inheriting FieldtypeMulti
elabx replied to elabx's topic in Module/Plugin Development
I did place that code, but will work on refine it, thanks! Do you have any recommendation on to removing this? I saw it was sort of a requirement to enable pagination on fieldtypes? Is this assumption correct? Thanks a lot for your help @ryan! -
Selector query performance in Fieldtype inheriting FieldtypeMulti
elabx replied to elabx's topic in Module/Plugin Development
Got this!! SELECT pages.id, pages.parent_id, pages.templates_id FROM `pages` JOIN field_event_recurring_dates AS field_event_recurring_dates ON field_event_recurring_dates.pages_id = pages.id AND ( ( ( field_event_recurring_dates.data >= '2023-03-09 00:00:00' ) ) ) LEFT JOIN field_event_recurring_dates AS field_event_recurring_dates__blank1 ON field_event_recurring_dates__blank1.pages_id = pages.id WHERE (pages.templates_id = 50) AND (pages.status < 1024) AND ( ( ( field_event_recurring_dates__blank1.data IS NULL OR field_event_recurring_dates__blank1.data <= '2023-04-08 10:36:35' ) ) ) GROUP BY pages.id -- [525.6ms] Would you think the id column is still hitting the performance some way?? The fieldtype's schema right now is as: $schema = parent::getDatabaseSchema($field); $schema['id'] = 'INT UNSIGNED NOT NULL AUTO_INCREMENT'; $schema['data'] = 'datetime NOT NULL'; $schema['keys']['primary'] = 'PRIMARY KEY (id)'; $schema['keys']['pages_id'] = 'UNIQUE (pages_id, sort)'; $schema['keys']['data'] = 'KEY data (data)'; Conclusion, need to wrap my head around MySQL properly, my favorite CMS has got me too spoiled haha. -
Selector query performance in Fieldtype inheriting FieldtypeMulti
elabx replied to elabx's topic in Module/Plugin Development
It's a datetime type column and can confirm it has an index. (BTREE type shows on phpmyadmin?) I did in a bit of a trial and error (looking at the FieldtypeTable's code!) to get the field to paginate because with recurring dates things can go wild and I didn't seem to get it work without the id field, maybe I am understanding something wrong? I am going to create those missing indexes and try the get match query get back on this thread! I was actually already trying with the one from FieldtyeDatetime, so I guess I'm on the right track! Thank you so much for taking time to answer, invaluable!