Leaderboard
Popular Content
Showing content with the highest reputation on 05/21/2024 in all areas
-
Is your module configured as autoload? Also, as @flydev beat me to the punch, I assume this is some sort of an execution order problem you are having. My question is exactly about that... any non-autoload module actually gets loaded and initialized only on-demand, e.g. only at a certain point down the road when you are actually using it (in a hook for example) which might be after PW decides which PageClass to use. Also, gathering from your other posts, config.php might be too early in the OOE and ready.php might be too late. EDIT: I have had these problems in the past. I took on the whole PW core in an afternoon in order to understand how stuff works and especially, how PW works under the hood. This shed a ton of light into how to do things and where to hook into. Right now, if I am having a problem, I am just looking at the actual source code as my documentation.3 points
-
@MarkE in order to get rid of any frustration, I suggest you try to understand the order of execution of pw, as suggested by @BrendonKoz profiling a fresh install, and then adding your module and starting profiling again, and then comparing each runs is your best bet and will make things clearer for you. If you dont have ProfilerPro, just tell us if you are running on windows or linux and I will write you a small tutorial to get a profiler with xhprof, it's easy and take 2 minutes.3 points
-
At this level of uncertainty, this is where I'd probably set up xdebug to integrate with an IDE to step through processes. Alternatively, maybe Ryan's ProfilerPro in ProDevTools to compare how the module version works vs the traditional?3 points
-
Thank you @kongondo, You got me on the right path and I have found the issue. My homepage template has url segments enabled. Once I disable this, the url works. Not sure if this contributes to the problem but I use TemplateEngineFactory. To keep url segments I used a regex to allow anything but paths that start with find-padloper in the template settings. regex:^(?!find-padloper).*$1 point
-
@howdytom Ok I none of my IOS devices have 17.4 exactly so that is probably why I could not replicate that. I had a quick go at updating the dependency but everything breaks when I do that. I have no idea what has changed in 2 years but its enough to cause challenge issues adding new keys and existing keys are no longer "familiar" on the login prompt. Simply put I do not have enough knowledge or time to dedicate to this besides quick bug fixes. A quick glance at the github changes between 1.1.3 and 2.0.0 really does not show why it falls apart after an update. As its failing even the registration part which is unrelated to the changes I am surprised no one has made a better webauthn for processwire. This was and still is a proof of concept. It works but very much could do with someone that is good at PHP The initial login bug also is not happening for me with a fresh copy of PW and module in Chrome 125. Sounds strange though. I would be happy to look into that but its hard to debug when the issue does not happen for me. Is this also on MacOS? do you get the system prompts as expected??1 point
-
Hi @virtualgadjo - I am glad unchecking the overwrite names option solved things for you. I dug into that section of code and discovered an issue with duplicate titles (when both set during a batch update) and fixed that in the latest version. I don't think this change will help what you were seeing - I think that is something ML that I haven't been able to reproduce, but at least I found and fixed something else :)1 point
-
Just a brief 'sort of' tutorial based on my experiences documented here. I have built a couple of modules in the past which created and used their own specific templates and which had page classes associated with these. My approach has been to put the scripts containing the page classes in the same directory as the module (rather than the classes directory) so as to keep all the module-related stuff together. I would then'include/require' those scripts in my module init() method. This worked very well until recently. Then, as documented in the above link, I found that in some circumstances (the details of which still escape me but might be to do with the number of templates involved) the page classes were not always being applied in time for all templates. My solution is to put the include/require in the module's __construct() method as it is called before init(). This seems to work, but bear in mind that the full API is not available at this time.1 point
-
Hi @Ash and welcome to the forum! It sounds like ProcessWire should be a great fit for your requirements! IMHO you have two options Build a custom UI on the frontend Use the PW backend 1 has the benefit that you can build it however you want with all the tools and workflows you already know. It has the drawback that you have to build everything that is necessary (user registration, all kinds of security mechanisms etc). Basically you are building a mini-CMS for your clients and we already have a great CMS at our hands ? 2 has the benefit that it is a well established platform for content management, and what you are trying to do sounds like content management to me ? The drawback is that you have to first learn how the backend works and how you can customise it or how to develop your own modules with custom workflows. Which way is preferable depends on you, your skills and your needs (and your clients). Is design and a good UI/UX very important? It might make sense to build a custom UI. Is it more important to be cost effective? Do you want to build on a solid foundation? Are you willing to learn PW and also benefit from the knowledge for future PW projects? Then diving into PW backend development might be very worth it. I took the backend pill years ago and don't regret it ? I don't know what exactly you are asking, but the short answer is "yes". ProcessWire is great at working with data, either from the UI or also from the command line. And it has always been - see this ancient post from 2010, for example. Nowadays we even have an API for reading CSV files line by line, so an import script could be as simple as this: <?php while($row = $files->getCSV('/path/to/foods.csv')) { $p = new Page(); $p->template = 'food'; $p->parent = 123; // page id of parent $p->title = $row[Food]; $p->type = $row[Type]; $p->color = $row[Color]; $p->save(); }1 point
-
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.zip1 point
-
1 point
-
Hi @Paul Greinke How about this? <?php $pageArray_a = wire('pages')->find('template=release,name%=a'); $pageArray_b = wire('pages')->find('template=release,name%=b'); $pageArray_a = $pageArray_a->append($pageArray_b); ?> Gideon1 point