Jump to content

dynweb

Members
  • Posts

    101
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by dynweb

  1. You might want to try $http->download($url, $file, ['verify_peer' => false]); Or maybe additional context options: https://www.php.net/manual/en/context.ssl.php
  2. Sorry to derail this thread, I would like to download the new version from my download link, but it seems to be the same version that I bought in May 2020. It always says v0.1.2 β... Thank you ?
  3. This shouldn't be a problem ?
  4. Have you ever thought about using a repeater field (instead of CKE) for user input? One repeater item for each tab? This would be much easier for the client and certainly less error prone...
  5. This put me on the right track ? I had a Pages::saved hook that set output formatting to true (when it shouldn't). Thank you!
  6. It is multi-language. As far as I understand, $page->get($field) returns the field value (a string) if output formatting is true, and a field object if output formatting is false (what we need here).
  7. Using the module on a multi-language site. When saving a page, I get the following error: "Call to a member function setLanguageValue() on string", File: .../modules/SearchEngine/lib/Indexer.php:99 98: if ($index_field_exists) { 99: $page->get($index_field)->setLanguageValue($language, $index[$language->id]); 101: } I suppose we need a $page->of(false) here before calling setLanguageValue() ?
  8. Same for me ? Issue solved, thank you.
  9. Hi @kongondo, I'm encountering the same problem as @Stefanowitsch on the latest Media Manager: Multiple image uploads not working, exactly how he described it. Did you find a solution? I do *not* experience this problem, so it may be unrelated... Thank you ?
  10. Converting relative URLs to page IDs doesn't seem to work if there is more than 1 URL segment (/page1/subpage/) AND the application is NOT running in a subdirectory. I had to replace line 86 from FieldtypeAssistedURL.module $urlPage = "/" . str_replace($this->wire('config')->urls->root, "", $urlParts[0]); with if($this->wire('config')->urls->root !== '/') { $urlPage = "/" . str_replace($this->wire('config')->urls->root, "", $urlParts[0]); } else { $urlPage = $urlParts[0]; } to make it work. Am I missing something?
  11. Just replace in FieldtypeSeoMaestro.module.php, line 119: // return null; return $this->wire(new Fieldtypes()); This works for me...
  12. Thank you ! I applied the fix from that post to VPS, and everything is fine ?
  13. Very strange display issue here... Images display correctly in list view... ... but some images fail in thumbnail view: Any ideas?
  14. $config->urls->templates $config->paths->templates in your config.php can do that.
  15. You will find a page's basename in the "name" column of the "pages" table.
  16. https://github.com/processwire/processwire-issues/issues/767
  17. I think that means that existing keys will not be overwritten, cf WireArray class: public function import($items) { if(!is_array($items) && !self::iterable($items)) throw new WireException('WireArray cannot import non arrays or non-iterable objects'); foreach($items as $key => $value) { if(($k = $this->getItemKey($value)) !== null) $key = $k; if(isset($this->data[$key])) continue; // won't overwrite existing keys $this->set($key, $value); } return $this; } It seems that the line above if(($k = $this->getItemKey($value)) !== null) $key = $k; causes the problem. getItemKey() uses array_search and returns the key of the first value found, so the second, identical value is missed...
  18. I put the following code in my template: $a = WireArray([ WireArray([ 'template' => 'basic', 'key' => 'animals', ]), WireArray([ 'template' => 'default', 'key' => 'default', ]), ]); print_r($a); Output: ProcessWire\WireArray Object ( [count] => 2 [items] => Array ( [0] => ProcessWire\WireArray Object ( [count] => 2 [items] => Array ( [template] => basic [key] => animals ) ) [1] => ProcessWire\WireArray Object ( [count] => 1 [items] => Array ( [template] => default ) ) ) ) So... where is the "key" of the 2nd array element? It only happens if the value is "default". Any ideas ? Thank you. Edit: Newest Processwire 3.0.121
  19. I remember doing it by hooking before ProcessPageView::pageNotFound(). Not sure if you can hook earlier... HTH ?
  20. My favorite: http://martinfowler.com/bliki/TwoHardThings.html
  21. Please use (as you did) "related_category" as field name (with no subfield), and it will display the titles of all related items. Use of FieldtypePage.anysubfield is possible, but only the first related item is displayed (as in the Core module). I'll try to find a solution for the next version... To avoid the error, please use this version.
  22. @Soma: You are right, the naming does not really matter in this case, but I still prefer to comply with PW naming conventions. I also added a callback to delete the thumbs generated from cropimages if the parent image is deleted. And added the module to the modules directory Thank you everybody for their feedback!
  23. Thank you, Ryan. You are right regarding the thumbs, the code comes from one of the existing modules. I'll try to fix this and add it to the modules directory.
  24. Link fixed. Never trust a WYSIWIG editor.... Thank you, Soma.
  25. Custom Page List lets you easily customize the page list (tree) in the admin section. I wanted something more (easily) configurable than the existing solutions, so I tried to add some new functionality with an easy to use interface. This is my first module for ProcessWire, so don't hesitate to let me know how to make it better Based on the work of Philipp Urlich (somatonic): PageListImageLabel https://github.com/somatonic/PageListImageLabel Adam Spruijt (adamspruijt): PageListBetterLabels https://github.com/adamspruijt/PageListBetterLabels Features Customize styles and separators used in the page list Display custom labels for each field Display image thumbnails Display formatted dates Display info from related models (e.g. title field of related pages) Display on/off checkbox as "Yes/No" (ready for translation) Define output filter(s) for each field Configuration See the README that comes with the download. Download Source code is available at https://github.com/hgassen/custom-page-list.
×
×
  • Create New...