Jump to content

matjazp

Members
  • Posts

    685
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by matjazp

  1. @dragan thank you. $wire->addHookAfter('ProcessLogger::execute', function(HookEvent $event) { $event->return .= '<script>jQuery(document).ready(function($){$("#AdminDataTable1").trigger("sorton",[[[1,1]]]);});</script>'; });
  2. This is certainly something Ryan would easililly implement as you suggested, but you know that he almost never accepts PRs. This is not an issue but rather feature request, but there are already so many of them ... I was playing with simulating click() on MODIFIED column but failed, my js/jquery knowledge is a bit limited :-)
  3. When you view log files in the admin (Setup->Logs), they are sorted by name. I would like them initially sorted by date, newest to oldest. WireLog::getLogs() method support that with $sortNewest parameter set to true but there is no option to pass that parameter to ProcessLogger::___execute() method. I could hook before and replace the whole ProcessLogger::___execute() but don't like that. Any other option?
  4. Perhaps go with "Število slik: xx" xx can be any number and works in English too.
  5. As the module is quite new, renaming the module in this stage wouldn't be a bad idea? Perhaps in combination with "custom element" for uniqueness as Macrura said...
  6. Found what was going on and created the issue https://github.com/processwire/processwire-issues/issues/1076 I would still be happy if someone else coud test it...
  7. @dragan maybe I wasn't clear: I'm not developing a module and I'm not trying to delete a module from any other module or template or any other script. I just want to delete the module(s) using PW admin interface. It's actually public function ___delete($class) that fails...
  8. I have this folder structure in my modules folder: C:/inetpub/wwwroot/site/modules/Aa |-Aa.module |-folder B- |-folder C That is, in folder Aa there is folder B and inside is folder C. When I delete this module via modules I get an error that module Aa can't be deleted. File Aa.module is deleted, folder C is deleted, but folder B is not deleted and because of that folder A is not empty and also not deleted. The odd thing is that when I do wireRmdir("C:/inetpub/wwwroot/site/modules/A", true); in my template file, the folder is deleted as expected. Anyone willing to try? I found out that commenting the do loop in ProcessModule.module, around line 2126 makes it work!
  9. @Haagje R. as dragan said, first setup ftp or shell access to the root of PW installation and then remove/rename install.php. I don't get it how the site was working with install.php present. Then, as Bitpoet said, replace ProcessWireUpgrade module with the new one, as this is the problem. I use PW on WIndows/IIS and not on Linux/Apache but I can help using Teamviewer. PM me if needed.
  10. @christophengelmayerThis was a bug in PW core, but it's fixed in 3.0.150. But Ryan recommends: "it's good to have a module in the ProcessWire namespace, since module names must already be unique." So, I currently see no benefit having your own namespace and recommend you change it to ProcessWire (or have no namespace if you want your module to be compatible with PW 2).
  11. This is now fixed in https://github.com/processwire/processwire/commit/c5417d98ad968ae1aa4b00c73304dc1b4f21c2f3 (PW 3.0.150)
  12. Just edit your profile, it has system field admin_theme, and the error is there... It really bothers me as I don't know what could be wrong.
  13. I found out that this warning pops up if you edit a field admin_theme (and I have admin_theme field on that template).
  14. Would you mind sharing your code? I'm thinking that maybe a textformatter on RTE field would be better fit in some cases as generally images in header/footer are most likely already optimized? I would also be interested in how it goes in long term, what are the savings with webp comparing to optimized images. I wasn't testing with <picture> but I used this approach: $config->hasWebpSupport = (strpos($_SERVER['HTTP_ACCEPT'], 'image/webp') !== false); //this is in /site/config.php $url = $config->hasWebpSupport ? "webpUrl" : "url"; foreach($page->images as $img) { echo "<img src='{$img->$url}'> "; } But I think Horst commented that this would kill caching (don't remember exactly...). Also, some browsers don't support webp, but I wouldn't bother too much.
  15. That's why I said I'm lucky. All my PW sites are "in the house" and my "clients" are my colleagues at work and they do what I say :-) I see. My "customers" are 95% from Slovenia so I don't have to worry about that, luckily. I haven't implemented webp on my sites so I didn't think about that because I just recently upgraded to PW that has webp support. On my sites images are rarely inserted into RTE. If this is the case then you may be better of using .htaccess strategy.
  16. Yes. I think you should go with webp using strategy 3 (using <picture>). Be aware that, based on my testing, webp image is not always smaller so I had to set quality to 80. On my sites, I don't use Autosmush because my editors prepare/optimize images before uploading them to PW and I serve them as original, I don't resize/optimize them. I consider myself very lucky in that regard as I know it can't be that easy with other clients. My opinion on optimizing assets (js/css/images/html) has changed lately. I used to be very pedantic on every byte I could shave off. But now? Do I care much if my css is 30% larger/smaller (in term of download speed)? Not really. Do I care if my image is 500k or 300k? No. We are in 2020. Free WiFi everywhere (at least here in Slovenia) and fast enough. WiFi 6 on the way. LTE/4G everywhere and fast enough (and practically free). 5G on the go. Web servers gzip content. Browsers use cache. What I do hate is javascript slowing down my web browsing experience, making the content reflow, serving me ads. So I browse with no js most of the time. I went off topic, sorry...
  17. Can't look at the source right now, but I don't think there is any customizable way of suppressing other then commenting the line that produces it. I haven't been working on this module lately but are you using experimental feature? I don't think this is the way to go now that we have webp support?
  18. Stumbled on this one: https://www.g2.com/products/processwire/reviews/processwire-review-1595157 1 out of 5 stars...
  19. Are you hitting maxAllowedContentLength? I think it's 30000000 bytes by default ...
  20. @teppo, that's what I do on my production sites. But on test environment, I try a lot of things and so there are some "test functions" just lying around... That's why I said that this is not a problem of the module (or the author of the module). But yes, the word "problem" is not quite adequate, thank you for the clarification.
  21. I changed namespace to ProcessWire and the error while editing a template is gone. The problem with page->render is still there, of course.
  22. I just cloned my basic-page template and now the error is gone... Oh my, have no idea what could be wrong with my template.
  23. Yes. <?php namespace ProcessWire; echo "basic-page template"; That's it! It must be something on my installation... On the other hand i just found out that if you use functions in a template, like this: function foo() { } and the try to generate, you get: This is not a problem with your module but rather with page->render() method...
  24. Thanks for the module! After installing it, I get this warning when editing a page: 1× PHP Warning: class_parents(): Class ProcessWire\StaticWire does not exist and could not be loaded in C:\inetpub\wwwroot\wire\core\Functions.php:955 The odd thing is that it happens only on one template and I can't figure it out what could be wrong with that particular template...
  25. Some encoding problems, this is how it looks when dashboard is empty: Learn how to add and configure panels reading the <a href="https://github.com/philippdaun/processwire-dashboard" target="_blank">documentation</a>. I guess documentation should be a link. EDIT: I see now it's multilanguage issue,
×
×
  • Create New...