Jump to content

dynweb

Members
  • Content Count

    51
  • Joined

  • Last visited

Community Reputation

44 Excellent

About dynweb

  • Rank
    Full Member

Profile Information

  • Gender
    Male
  • Location
    Strasbourg

Recent Profile Visitors

2,259 profile views
  1. 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!
  2. 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).
  3. 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() ?
  4. Same for me ๐Ÿ™‚ Issue solved, thank you.
  5. 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 ๐Ÿ™‚
  6. 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?
  7. dynweb

    SeoMaestro

    Just replace in FieldtypeSeoMaestro.module.php, line 119: // return null; return $this->wire(new Fieldtypes()); This works for me...
  8. Thank you ! I applied the fix from that post to VPS, and everything is fine ๐Ÿ™‚
  9. Very strange display issue here... Images display correctly in list view... ... but some images fail in thumbnail view: Any ideas?
  10. $config->urls->templates $config->paths->templates in your config.php can do that.
  11. You will find a page's basename in the "name" column of the "pages" table.
  12. https://github.com/processwire/processwire-issues/issues/767
  13. 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...
  14. 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
  15. I remember doing it by hooking before ProcessPageView::pageNotFound(). Not sure if you can hook earlier... HTH ๐Ÿ˜‰
ร—
ร—
  • Create New...