Jump to content

matjazp

Members
  • Posts

    687
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by matjazp

  1. 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...
  2. 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,
  3. @Robin S Sorry, we can't show this content because you do not have permission to see it.
  4. I guess "Add dashboard page to user dropdown navigation" isn't supported in AdminThemeDefault?
  5. When I add 'editMode' => 'modal' to the collection panel, this pops up: PHP Notice: Undefined index: host in ...\Dashboard\DashboardPanel.class.php:329 Perhaps you could use isset? if (isset($info['host'])) When modal is closed, there is an error in the console: Uncaught ReferenceError: UIkit is not defined Dashboard.js?v=0.5.0-1579071638:2 Can't debug this as js is minified.
  6. Perhaps actions col in collections (DashboardTableColumn__actions__) don't need to be sortable? Would be nice if we could set the icon for every shortcut in Shortcuts panel, regradless if page has the icon set. On the other hand, I can create my own panel :-) Is support for IE11 planned?
  7. Yep, working, even with {title} set for userLabel. Thank you.
  8. Title is not displayed even if I use AdminThemeUikit. Problematic is this line: $userLabel = $this->modules->getConfig('AdminThemeUikit', 'userLabel') ?: 'title|name'; // return "{Name}" Note that $userLabel is always {Name}, regardless of what theme is used. What happens if AdminThemeUikit is not installed? If I set $userLabel to 'title|name' then the title is displayed. Perhaps you should specify in module settings the minimum PW version (guess its 3.0.66 - when getConfig() is introduced) and minimum PHP version (at least 7.0?).
  9. @d'Hinnisdaël thanks for this module! haven't tested it properly, just quick observation: user label (title|name) is not displayed in headline in AdminThemeDefault. Also pagelist could use same margins.
  10. This is what I wanted:
  11. I have a site, recently upgraded to latest master and latest PHP. Almost every time I go to Pages or Setup or Modules in the admin navigation (I'm using AdminThemeDefault), I get a notice: "Cleared the admin theme navigation cache (topnav)." When I view modules.txt in the admin, after every XHR refresh, there is a new log entry, as seen on the screenshot: "Saved modules info caches". I cleared the cache folder and caches table in DB to no help. Any ideas? I don't think it has anything to do with the upgrade, as I reverted back to previous version of PW. Something with DB? EDIT: stupid me. I had $modules->refresh() in my admin.php Mods: you may delete this post.
  12. Now you got me thinking... As I'm logged as admin and I also set debug to true it's logical to see those messages. Looking at the source in Modules.php, the message about upgrading the module (version change) is shown for all users. As I'm not using Tracy on production site (currently on PW 3.0.104), I put those lines you suggested in admin.php and that showed two lines: AdminThemeDefault: Installed field "admin_theme" and added to user profile settings. AdminThemeDefault: To use this theme, select it from your user profile. Never saw those messages before, but after the refresh, there are gone. But then again, this popped up: Modules: Upgrading module (ProcessPageTrash: 1.0.2 => 1.0.3) when I went to empty the trash. So, it looks like just getting the module is not enough, since $modules->refresh() still state that: Modules: Detected 1 module version change (will be applied the next time each module is loaded):
  13. @dragan thanks for the info about great module from Adrian, but I'm not sure if this is what I need? I will not import/export, nor will I update modules - where update means fetching the new version from the github or somewhere else. If I want to prevent the info message "Modules: Upgrading module (modulename: oldver => newver)" for editors, I have to click around in the admin interface until all updated modules/fieldtypes etc. get updated to new version.
  14. Another question: while editing a page, is it possible to upload a predefined file? I have files field, there is "Upload file" button. Let say that I have another button, "Upload specific file" and I want that clicking this button automatically upload a predefined file, located on the server, not at the client. Just like "Upload file" button but without the file selection window, opened by the browser. I know all browsers prevent prefilling file values without the user interaction, so input type=file is not an option? I could (didn't yet try) add that preselected file to my files field via ajax call (any security issues with that?) but after that I would like all the acctions supported by InputfieldFile to take place (render "uploaded" file).
  15. You can enter URL in the file open dialog, where you could enter local file.
  16. Oh, didn't know that, thanks for the tip! But the point is that I don't want to upload a file. Maybe Robin's module adopted to my needs is the way to go... But at the and, I stil need some dummy file. Will think about (if users really want's this).
  17. Yes, I know, the title is strange, let me explain. I have files field where users in admin upload attachments, like pdf, zip, doc, etc. I render those attachments in my template, nothing fancy here. But sometimes there is a need to display a link to some file (document) that is not part of PW. Now, the user has to download the document and upload it to the files field (and add some description). Ideally, there would be another button along with the "Upload file" eg. "Insert link" that would upload some dummy file and then I could use custom fields support for file and image fields to add the URL. Any other ideas? I know I could use repeaters, but I would like to make it simple.
  18. When PW is upgraded you get notifications that modules/fields will be upgraded to the newer version the next time each module is loaded. For example, when I go to edit my profile, I get a notice: Modules: Upgrading module (ProcessProfile: 1.0.3 => 1.0.4). Is there a way to upgrade all the modules?
  19. It would happen to any fieldtype since filter() and not() methods are destructive. On the first call the $fields array ($productTemplate->fields) would contain all fields, after applying filter it would contain only filtered fields. On the second call of your function $productTemplate->fields does not returns all fields but only filtered fields ('FieldtypeText', 'FieldtypeTextLanguage', 'FieldtypePageTitle' and 'FieldtypePageTitleLanguage') and FieldtypePage is not among them. Use find() instead of filter() as it returns a new WireArray, this might work: if ($allowedFieldTypes) $fields = $fields->find('type=' . implode('|', $allowedFieldTypes));
  20. Does it help if you add: else if($method == 'PATCH') { curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method); } on line 625? I'm not using FormBuilder or LoginRegister module, so I may be way off.
  21. I can't duplicate. I don't use _init.php, but I put this into home.php and basic-page.php: bd($user); bd($user->language); bd($user->language->title); And I get the same result, title is string.
  22. But with this approach you have to install/copy the module files. And when the fix is fixed in the core, then what? Perhaps the mandatory field for the fix (along with the title and description) should be the PW version number and fix applied only on lower versions? Also, we have AOS that provides some fixes/enchantments and Admin Actions. Where do you position PwQuickFixes?
  23. I could be completely off but maybe setting the path is not working correctly: https://github.com/processwire/processwire/pull/156 (related to https://processwire.com/blog/posts/pw-3.0.141/#processwire-system-urls-paths-now-more-customizable)
  24. I first time used $config->pagefileSecure = true; option in config.php. When I echo the image webp extra like this in the template: echo "<a href='{$img->webpUrl}'>Click to view image</a> "; and then click on the link, the image can be viewed in the browser, as expected. But when I set pagefileSecure to true, reload the page and click on the link, the image is downloaded. I can see the warning in Chrome console: Resource interpreted as Document but transferred with MIME type application/octet-stream: "http://localhost/site/assets/files/1015/nature1.webp". Also, headers changed to: Content-disposition: attachment; filename="nature1.webp" Content-transfer-encoding: binary Content-Type: application/octet-stream Is this expected or maybe something wrong with my webserver config (IIS)? I didn't change access permissions on the template and also viewing the image logged as admin user.
  25. Should webp extra image get deleted if you replace the original image? That is: upload an image, thumb is generated, then create webp extra by using $myimge->webpurl, then in the admin you replace the image by uploading with the same name eg. replace img1.jpg with img1.jpg. Original image is replaced, thumb is recreated, but webp stay the same. This is how it should be?
×
×
  • Create New...