Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Zeka last won the day on November 26 2019

Zeka had the most liked content!

Community Reputation

838 Excellent

About Zeka

  • Rank
    Hero Member
  • Birthday 04/12/1989

Profile Information

  • Gender
  • Location
    Kiev, Ukraine

Recent Profile Visitors

3,006 profile views
  1. @J_Szwarga Have you tried to set base URL? https://processwire.com/api/ref/markup-pager-nav/set-base-url/
  2. Hi I'm moving quite a large news site from custom CMS to PW. Currently, it has 140000 pages. The current URL structure is like 2020/01/09/slug.html After import to PW all these pages will be under one parent "Archive" and will have new URLs and I'm thinking how better handle this amount of redirects. There is PagePathHistory module in the core with its quite convenient methods like $page->addUrl. But I'm not sure how it will perform with such number of rows. What do you think? Maybe there is a better way how to manage it? Eugene
  3. @Robin S This is terrible. I don’t know how I overlooked it, сause I've looked at this part so many times Thanks!
  4. Hi. I begin to rewrite hooks to custom pages types and have found out an issue with find method. My custom PagesType class doesn't implement find method and inherits it from PagesType class. which relies on $pages->find By default $pages->find method exclude hidden and unpublished pages, but if I call find on my custom PagesType it returns also unpublished pages, but not hidden. In code: class Posts extends PagesType { public function __construct(ProcessWire $wire, $templates = array(), $parents = array()) { parent::__construct($wire, $templates, $parents); $this->setWire($wire); $this->addTemplates("post"); // templates_id=51 $this->addParents($this->pages->get("template=posts")->id); // parent_id=1036, $this->setPageClass('Post'); } } // in home.php $news = wire('posts')->find('sort=-publish_from, limit=500'); // selectors => "sort=-publish_from, limit=500, parent_id=1036, templates_id=51" // returns 489 items including unpublished pages, but excluding hidden pages $news = wire('pages')->find('sort=-publish_from, limit=500, parent_id=1036, templates_id=51'); // selectors => "sort=-publish_from, limit=500, parent_id=1036, templates_id=51" // returns 480 items excluding unpublished and hidden pages Probably I missing something obvious, but I can't understand why it behaves in this way. In PagesClass::find I don't see anything that can affect on Pages::find. Maybe it's intended behavior with PagesType? Thanks, Eugene.
  5. Zeka


    @felted This module is not installed by default. Go to Module-> Core and install it.
  6. @flydev 👊🏻 Thanks. Any ideas where to look?
  7. Hi. I get logged out when I try to save a page which contains emojis like 📱, but fields are saved. Then when I try to log in back on the same URL I get 'This request was aborted because it appears to be forged.' I tested it on several setups. Could somebody confirm the issue? Setup: PW 3.0.148 InnoDB utf8mb4_general_ci
  8. @Robin S Thanks. For now, I ended up with .... $this->wire()->addHookAfter('Pages::trashed(template=link-block|post|tag)', $this, 'customRedirectOnDelete'); public function hookRedirectOnLinkBlockDelete($event) { $event->wire()->addHookBefore('Session::redirect', function(HookEvent $event) { $url = $event->arguments(0); if($this->process == 'ProcessPageEdit') { $admin_url = $event->wire('config')->urls->admin; if(strpos($url, $admin_url . 'page/?open=') === 0) { $event->arguments(0, '../trash/'); } } }); }
  9. Hi. Hi. By default when you delete a page from delete tab on page edit screen it redirects to URL like 'admin/page/?open=1033' where 1033 is ID of the parent of deleted page. I'm using a custom process module for managing news pages, so I want to redirect to my custom trash page. This URL is hardcoded in ProcessPageEdit module https://github.com/processwire/processwire/blob/master/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module#L2434 AFAICS the only way to change it is to hook ProcessPageEdit::buildFormDelete, remove default checkbox, add custom one and then hook to ProcessPageEdit::processInput, execute custom delete function. Is it? Maybe there is easier way?
  10. Hi. Is it possible to set matrix/repeater item collapsed/uncollapsed state via API? Currently I set 'Repeater item visibility in editor' setting to 'Items always open (disables dynamic loading for existing items)' , but it more like a workaround than a solution. Thanks, Eugene.
  11. @hansolobg Did you include your class file?
  12. @mader-christoph Sorry, but I don't have anything to say regarding your question, but there are several related threads^
  13. https://modules.processwire.com/modules/admin-restrict-branch/
  • Create New...