Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. So far I found that using if(!$config->ajax): in my _main.php around head and foot parts and having a div targetted by Javascript as is commonly used - but in the case of an Ajax call I use wireRenderFile() to load markup from a file containing just the markup I need seems to work.... but I'm still playing with this. Paul
  3. Today
  4. horst

    WireMailSmtp

    Hi @felix, I don't want to enable plain text files with server & password settings, but going with the already needed and available site/config.php, as @adrian suggested, seems to be fine. (As it already stores the DB-credentials). I try to look into it and implement it this weekend. I think this can be useful for a lot of us.
  5. Hi @Zeka Did you comment out rule 16a and uncomment 16b in your htaccess? (reference)
  6. User registration example: public static function addUser($data) { RestApiHelper::checkAndSanitizeRequiredParameters($data, [ 'username|selectorValue', 'password|string', 'email|text', ]); $item = new User(); $item->setOutputFormatting(false); $item->name = $data->username; $item->pass = $data->password; $item->email = $data->email; $item->addRole('guest'); $item->save(); }
  7. Yesterday
  8. A recent GitHub request got me thinking about ways to get an overview of which fields are using which Textformatter modules. Here are a couple of approaches... 1. For all Textformatter modules that are in use, show the fields they are applied to Execute the following code in the Tracy Debugger console: // Loop over fields and get their Textformatters $textformatters = array(); foreach($fields as $field) { if(empty($field->textformatters)) continue; foreach($field->textformatters as $textformatter) { $textformatters[$textformatter][] = $field->name; } } d($textformatters); Any Textformatter modules that are not included in the dump output are not applied to any fields. 2. In the config screen for a Textformatter module, show the fields where the module is applied Add the following to /site/ready.php $wire->addHookBefore('ProcessModule::executeEdit', function(HookEvent $event) { // Get module being edited $module = $this->wire('modules')->get($this->wire('input')->get->name('name')); // Return if it's not a Textformatter module if(!$module || !$module instanceof Textformatter) return; // Add field to module edit form $event->wire()->addHookBefore('InputfieldForm(id=ModuleEditForm)::render', function(HookEvent $event) use ($module) { $value = ''; // Find any fields using this Textformatter and build markup value foreach($this->wire('fields') as $field) { if(empty($field->textformatters)) continue; foreach($field->textformatters as $textformatter) { if($textformatter === $module->className) { $value .= "<a href='{$this->wire('config')->urls->admin}setup/field/edit?id={$field->id}#fieldtypeConfig' target='_blank'>$field->name</a><br>"; } } } if(!$value) $value = 'No fields are using this Textformatter module'; // Add markup field to form $form = $event->object; $f = $this->wire('modules')->InputfieldMarkup; $f->label = 'Fields using this Textformatter module'; $f->value = $value; $form->insertAfter($f, $form->children->get('id=ModuleInfo')); }); });
  9. Same issue here! Installation run on xampp. I think shortly after i updated from 3.0.98 to 3.0.123 it started with these "failed to load ckeditor.js: Page Not Found" alert. What i recognized than was that the ckeditor.js in fact isn't in the requested directory under wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.10.1 How could that be? What do i have to do? Am i the only one whis these kind of errormessage?
  10. The padding around quoted text is a bit much, as can be seen in the quote immediately above. Seems to be coming from Uikit styles, which I guess are being included in their entirety just for the header. Could we strip it back a bit so only the needed styles are included? Or iframe the header part to avoid the styling conflicts? Another issue I've noticed since the upgrade: in iOS Safari (older versions) links are triggered on release of long touch (to open the context menu). This makes it difficult to open links in a new tab - you have to slide your finger away from the link before you release in order to select an item in the context menu, or else you navigate away within the current tab. This only applies to Safari and only on older Safari/iOS versions so perhaps it doesn't affect too many people. It's a pretty big annoyance to me though because you cannot select an alternative default browser on iOS (thanks Apple) and I don't want to have to buy a new iPad.
  11. I wonder whether this module could be extended to serve as a EU-GDPR click solution. The original module does not have this, and I am not sure Ryan will change that for us poor Europeans.
  12. The easiest way to implement this would be via a Repeater field containing a Text Unique field. But it feels a little wrong to me to use a Repeater for just a single repeating field (that might just be me) and the UI would be a bit more bulky than necessary. So personally I would be inclined to use a more streamlined repeating fieldtype such as Multiplier or Table. Then in a Pages::saveReady hook you do a $pages->count($selector) to check if any stores are using any of the submitted phone numbers and if so you reset the value for that number and show an inputfield error. If you need any tips for coding that just ask when you get to it. P.S. It seems like you could use Multiplier with Text Unique specified as the field type to multiply, but I tested it and the uniqueness is not enforced when these modules are combined.
  13. If you're not harnessing the backend from ProcessWire I'd personally tend to not use ProcessWire. While it's entirely possible to do so (maybe also search for prev. discussions on the topic) there are some parts, which in my opinion discourage that kind of usage: Lack of proper testing capabilities. There are topics on how to do TDD with processwire, but the options on managing db state or handling requests in tests are not there. If you need to manage a lot of diverse data the autoloading of every template/field on each request can become a bottleneck. Working around it by reusing more fields/templates can work, but isn't great either. The selector engine for pages is great for light to medium complex stuff, but complex selections and especially aggregations need custom SQL or third party solutions like RockFinder. Also if you're not careful it's tempting to fall into n+1 query problems with fields / relationships being lazy loaded by default. Transactions are hardly used by the core, so if you want/need to prevent partial updates from happening you need to ensure that on your own by wrapping stuff into transactions. Not to say ProcessWire isn't otherwise a nice system, but those are the things I'd urge anyone to evaluate before using ProcessWire in a web application project.
  14. "framework" and "web application projects" are very very loose terms... If you could describe a bit better what you are trying to build, I'm sure people could chime in with more "to-the-point" suggestions, or concrete real-life examples from their own experience. There are various ways how to extend / customize the whole backend. Custom dashboard, custom modules etc. @bernhard has an excellent, epic tutorial how to create your own module to handle potentially... well, just about anything you'd want. So, I guess if you want to get constructive feedback here, you should elaborate on what you're trying to achieve. And what exactly do you miss in PW that you have in Laravel or Silverstripe.
  15. I have used ProcessWire as more of a framework numerous times last year. I will say, that sometimes recreating some of the backend functionality in the frontend was a bit of the headache (solely based on things like repeaters etc). Overall, it was very easy to get a front end going and using ajax to post/pull from the backend. I did use the Pages2Json to deliver the json with made the requests a bit easier for me. I am sure there are many more people here that have made bigger scale web apps though, and they might be able to give a bit more in depth response.
  16. Hey @bernhard - no rush, but @matjazp took care of some Windows / UTF8 issues which I have committed. I still can't replicate your layout problems, but when you get a minute it would be great if you could help to narrow down what might be causing the issues at your end. Thanks! Also, did my explanation help to alleviate your security concerns? If not, let me know what still concerns you and I'll address it.
  17. Is it maybe necessary to enable UTF8 page names first? https://processwire.com/blog/posts/page-name-charset-utf8/
  18. Hi @Mike Rockett I'm moving WP site to PW where I have such URLs with Cyrillic characters 2018/11/16/обухівських-школярів-навчать-писати/ and actualy it doesn't work. I have turned on debug mode and it says that there is no match. Also, I have tried to use Wildcards like Source {year:num}/{month:num}/{date}/{title:segment} Destination [template=archive-item,archive_url=/{year}/{month}/{date}/{title}/]] In the archive-item template, I have field archive_url that contain full URL in the format '/2018/11/16/обухівських-школярів-навчать-писати/'. Have I missed something? Thanks.
  19. kongondo

    Laragon slow?

    How old is that installation? Brand new. Is your account an Administrator or user account? Admin. Are there background update processes (downloading, clean up) running? Nope. Does Windows built its file index right now? Not that I am aware of. How about disk read/write performance in task manager? Is that higher than expected? I haven't noticed. Where is your Laragon folder located? C:\laragon for example? Other internal non-SSD drive; But it used to work OK before I moved to linux and back. Is that folder set to "compress" or how it is called to save disk space? Nope. I have enough storage; I don't use compression. Is Windows Defender or any other AntiVirus slowing down file access due to real-time-file-monitoring? I was suspecting this as well, but will confirm. Can you disable AV and test performance? I will and report back. Are there IIS/database services running and listening on the same ports? No. Does it make any difference if you enable/disable laragon autostart? No. Does it make any difference if you disconnect from the internet? I haven't tried but I can't imagine why. Is there a difference if you run Laragon as Administrator? I haven't tried. Are there other host entries or tools like XAMP interfere? I am not using other tools. Do you use another domain ending than .test? Yes. I'll try test. Do you use or are you running a VPN? I don't use VPN.
  20. Hi All, I have some web application projects ( not website, but custom application lots of admin management). So is it possible to use ProcessWire as a framework ? I mean, just like Laravel ? Since these projects are web application, the existing PW Admin panel is not sufficient, I will have to create many options from the scratch. I am thinking of doing such projects in Laravel but if PW can handle such tasks, then I would stick with PW. I checked out another framework called SilverStripe but it seems a lot of more closer as Laravel. Please let me know if I can use ProcessWire as a framework, if yes, pls point me to the Getting Started. thanks in Advance
  21. kongondo

    Laragon slow?

    What's wrong with Windows 7 .
  22. dragan

    Laragon slow?

    seriously? Windows 7? Maybe that's the root cause of your troubles...
  23. kongondo

    Laragon slow?

    Unrelated to laragon, but after switching to HTTPS, PW is throwing the dreaded 'appears to be forged'!! I cannot log into admin. None of the usual remedies (permissions, session fingerprint, etc) are helping. I'm so tired!!!!!!!!!!!!.
  24. Followed a couple different tutorials on setting up my own SSL certificate. I have deleted them but so won't work. Final solution, reset Windows. Everything is backed up. Doing that now.
  25. wbmnfktr

    Laragon slow?

    Just some ideas, thoughts and questions... How old is that installation? Is your account an Administrator or user account? Are there background update processes (downloading, clean up) running? Does Windows built its file index right now? How about disk read/write performance in task manager? Is that higher than expected? Where is your Laragon folder located? C:\laragon for example? Is that folder set to "compress" or how it is called to save disk space? Is Windows Defender or any other AntiVirus slowing down file access due to real-time-file-monitoring? Can you disable AV and test performance? Are there IIS/database services running and listening on the same ports? Does it make any difference if you enable/disable laragon autostart? Does it make any difference if you disconnect from the internet? Is there a difference if you run Laragon as Administrator? Are there other host entries or tools like XAMP interfere? Do you use another domain ending than .test? Do you use or are you running a VPN? I know this is not really helpful but maybe there is something in it than can help you to sort out the issue.
  26. tested. I set https: false still wont work. UGH frustration. will try again after a reboot.
  1. Load more activity
×
×
  • Create New...