Jump to content

matjazp

Members
  • Posts

    721
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by matjazp

  1. Maybe there is no need for another column, just another color?
  2. Thanks for the module @kongondoI'm playing with this and when URL is /processwire/dashboard-notes/view/ (without note id) I get an error: Call to a member function count() on null in ProcessWire\ProcessDashboardNotes->renderReplyMarkup(), line 1228, $note->dashboard_note is null. Check for urlsegment2 is probably needed. Also when you pass nonexisting id an error is thrown: Argument 1 passed to ProcessWire\WireData::setArray() must be of the type array, null given. I guess there is no support for comments that need to be approved? But as you said, this is in lazy development (nice wording) and good starting point for those who need it.
  3. It often happens to me too. I know Ryan made some adjustments in the core so that Tracy is loaded earlier (if I remember correctly), but is there really nothing that could be done in that regard? Could we have some sort of bd() function always available? Independent of the modules load order? Something that we put in init.php, even index.php? Yes, I do use $log methods, but Tracy is very handsome and good looking ?
  4. Adrian, I can't maximize the console panel, I see this error in Chrome console: Uncaught ReferenceError: tracyPanel is not defined at tracyResizePanel (?_tracy_bar=js&v=2.6.1&XDEBUG_SESSION_STOP=1:1130) at HTMLAnchorElement.onclick (?id=1015&s=1&c=1:1744) Not sure when this started...
  5. I cant' replicate here... Sure there are no hooks on url method?
  6. I see, in AdminiThemeUikit it's ok, no header, in AdminThemeDefault the header is there. Thanks for the info.
  7. Rabin, thank you for this. You have: // Pretend that this page is being loaded inside a modal // So that the admin header and footer are not rendered $this->wire('input')->get->modal = 1; This might not be quite true, depending on what is understood by "rendering", as header and footer are rendered, they are just hidden via css. Of course, that's not a "problem" with the module, that's how PW admin works, but it always bothered me. I also never saw anything like this: $page = $ppv->_callMethod('getPage', array()); What is this _callMethod?
  8. On mobile... $page->template == 'admin' $page->process == 'ProcessPageEdit'
  9. I tested here and the problem is indeed in WireFileTools.php, these lines: if(strpos($pathname, '//') !== false) { // URLs or accidental extra slashes not allowed if($throw) throw new WireException('pathname may not contain double slash “//”'); return false; } I commented them and image upload is working. Of course, the test for // is there for a purpose, so just commenting it is not the best solution. You are encouraged to report the issue at https://github.com/processwire/processwire-issues/issues OT: I found that using UNC considerably slowed down the whole web site. Maybe it's just something in my config, I simply created a test share on my own PC.
  10. Yes, this is the response from the server. Yeah... It never crossed my mind that I should mention this somewhere, sorry. I don't like to update on github when I'm not sure it works and this change was just a quick fix... Make sense. Give me some time to think about possible solutions. Probably the best option would be separate list of options for admin (backend?), what we have now, and for API (frontened?).
  11. My intention with this option was to prevent running the hooks in template files to maintain backward compatibility, currently hooks are applyed only in admin interface - don't want to change that as someone might use size() in template files but don't want to optimize images? So, by checking "Optimize on resize", you want images to be optimized in admin interface, and if you also check "Optimize in API" that means that optimize would happen in template files too. I'm not sure if this is how this new version is working actually, no time to test. But I see your point of view... Don't know what would be the best solution...
  12. @sivsy would you mind sharing your configuration? Mapped drives are in the user context, somewhere in the registry and your IIS knows nothing about that. PM me if you do not want to disclose information.
  13. @PWaddict please try this version. @adrian Don't know why hooks were only allowed inside admin template... I found it that way and just left it ? Uploaded version supports this, but you have to enable it, to maintain backward compatibility. Don't have much time to test, but it should be possible to do something like this: echo $page->images->first()->width(400)->url; and file should get optimized. More testing is needed... AutoSmush.module
  14. If I understand correctly: you would like that images created by CI3 (eg. yourimage.-thumbnail.jpg) also get optimized on upload? Currently, they are not since Horst is not using pageimage size method() so the hook is not triggered. I could optimize in imagesizer::resize(), but then you couldn't differentiate between CI3 and "normal" image, also I would have to rewrite some methods in Autosmush. On top of that, CI3 is executing resize() even if you cancel crop from the modal (if you press escape), there are some js errors... @horst
  15. In my testing I don't get tiny variation 48x. I have set portrait,200,600 in filed settings. To be honest, I don't use CI3 ...
  16. What do you mean by: Currently CI3 variations are not optimized in auto mode, they only get optimized when you manually crop.
  17. This is actually most likely a problem with allowPath() method in WireFileTools.php, introduced in an attempt to fix some issues with temp directory (if I remember correctly). All backslashes are replaced with forward slashes so your UNC notation \\host-name\share-name\file_path becomes //host-name/share-name/file_path. Double forward slashes are recognized as URL or some extra slashes, and an exception is thrown. The solution would be not to use UNC notation but rather map a drive to your share and use a drive letter.
  18. @PWaddict please tr y an attached version, let me know if optimize on resize is working and if double optimization of thumbnails is fixed. AutoSmush.zip
  19. I tested this line as the first one in ready() and no errors were shown. But I forgot on this: $config = $this->wire('config'); - put it just after $this->configData... I'm getting just one log when an image is uploaded and the thumbnail is generated... Are you also using size() methods? I don't use CI3, bu t will check.
  20. Can't test right now, but looking at the source code - could you move this line: $this->configData = $this->wire('modules')->getModuleConfigData($this); in AutoSmush.module, line 1217, up a few lines, to be the first line in ready() method? I guess I changed something from v 1.1.1 to 1.1.2 and didn't test (I can't remember what was it).
  21. On mobile so I cant test. Are you sure its not optimised? What log file says?
  22. Hooks are applied only in admin template...
  23. How are you resizing images? In admin (backend) or in template file via API?
  24. 1.2.1 is working fine, thanks @David Karich . I'm testing reset page views and putting template=basic-page in the selector, it returns a wrong number of pages. Or perhaps you are showing the number of pages that have counter different (larger) than 0?
  25. Hi, Thanks for this module. Nice and organized code! is there an option to disable session lifetime, like set it to 0? The minimal value is 1 due to how you check for 0. I see you are sending ajax requests to location.pathname.substring(1) + "/phcv1" but at least on my localhost location.pathname is /somepage/ so ajax is sent to http://localhost/mypage/mypage//phcv1 Shouldn't you use just location.pathname + "phcv1" ? Counter on the home page isn't working as you are passing an int to ctype_digit() function which expects a string. What I find odd is that ctype_digit(1) returns false while ctype_digit(1054) returns true. I'm not sure if ctype_digit is actually needed. The downside of this script is that sending ajax request put some load to the server itself and at least one findOne(). I'm not sure I like counters on the page list, would prefer table layout somewhere else.
×
×
  • Create New...