Jump to content

Zeka

Members
  • Content Count

    713
  • Joined

  • Last visited

  • Days Won

    6

Zeka last won the day on December 11 2018

Zeka had the most liked content!

Community Reputation

765 Excellent

About Zeka

  • Rank
    Hero Member
  • Birthday 04/12/1989

Profile Information

  • Gender
    Male
  • Location
    Kiev, Ukraine

Recent Profile Visitors

2,636 profile views
  1. @elabx Have you tried something like this? $selector = [ [ 'field' => 'template', 'value' => ['transaccion', 'pago'], 'operator' => '=', ], [ 'field' => 'pago_entit', 'value' => $user, 'operator' => '=', 'or' => 'test', ], [ 'field' => 'transaccion_representante_cliente', 'value' => $user, 'operator' => '=', 'or' => 'test' ], [ 'field' => 'sort', 'value' => '-created', ], [ 'field' => 'status', 'operator' => '<', 'value' => Page::statusTrash, ] ]; Not sure that is it even the right direction as it produces such selector dump: template=transaccion|pago, test@title=(41), test@email=(41), sort=-created, status<8192
  2. @elabx $pages->find("template=transaccion|pago,(pago_entity=$user), (transaccion_representante_cliente=$user), sort=-created, status<" . Page::statusTrash); In this selector you are using OR-groups. There is not much documantation, but you can look at this topics https://github.com/processwire/processwire-issues/issues/264
  3. if($config->ajax) { header('Content-Type: application/json'); echo $json; $this->halt(); // like die(); } else throw new Wire404Exception();
  4. @elabx Could you please tell more how did you implement it? I have an autoload module, where I declare my hook public function init() { $this->addHook('ProcessPageEdit::executePreview', $this, 'testPreview'); } public function testPreview($event) { return 'test'; } But when I try to access 'admin/page/edit/preview' I got redirect to 'admin/page/edit/bookmarks/' and 'admin/page/edit/preview/' ( with slash) redirects to 'admin/page/edit/preview/bookmarks/bookmarks/bookmarks/bookmarks/'.
  5. @bernhard And how you handle this requests? By hooks or custom methods?
  6. @rjgamer There is Fieldset (Page) that have desired API behavior ( it doesn't installed by default). You can read about it here.
  7. @dragan, @elabx, @Macrura Thanks for ideas. @Macrura Would be glad to see your module. Actually, my main intention is also to keep only Fieldtype and Inputfieldtype modules without additional modules. I have read somewhere that it is also possible to make requests to Input/Fieldtype config page. Have you tried this approach?
  8. @Lutz Heckelmann Not help, but that what I got on the shared hosting
  9. Hi. I'm working on Inputfieldtype that have to get some data from pasted URL. Something like InputfieldURLChecker, but this one is using js, but mine should use AJAX request to some endpoint on the site to get data and then render additional information to the inputfield. So the question is how to provide such endpoint. I think that I can create a separete module that creates some page under Admin and make a request to this page. But I'm not sure that this is an optimal way, maybe there is something already in Inputfiled class or elsewhere that can help. Thanks in advance. Eugene.
  10. Hi @tpr. Thanks for the module. I have spent some time to understand why the module doesn't work and the issue is that only ProcessPageEdit and ProcessProfile processes are allowed. But I have several process modules that handle page edit of custom page types. It would be great if we could control this option in the module config. There is $modules->findByPrefix("), so maybe you can provide such options with ASM select by $modules->findByPrefix("Process"); Thanks.
  11. @flydev Thank a lot. You brought me to mind that I have been testing the performance of some queries and declared in the config. $config->dbCache = false;
  12. @flydev Thank. Not a guru in SQL. MySQL 5.7.16 on a remote server. On the local server, I have 5.7.19 and I don't remember that I have such error. Is this error server specific?
  13. @HerTha Just curious is this code fails? $a_sel = [ ['sort', 'name'], ['limit', $limit_per_section], ['template', 'downfile'], ['title|name|indexer', '%=', $sanitizer->selectorValue($a_terms)] ]; $results = $pages->find($a_sel);
  14. Hi. I'm getting this error SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.id FROM `pages` JOIN field_banner_categories AS field_banner_categories O' at line 7 with this selector $this->wire('pages')->find("banner_position=sidebar, (banner_categories|banner_sections=$page), (banner_custom_pages=$page)"); banner_position - Select Options field banner_categories, banner_sections, banner_custom_pages - Page reference fields. This selector produces such SQL queries: banner_categories|banner_sections=1057 ---------------------------- SELECT SQL_NO_CACHE pages.id FROM `pages` LEFT JOIN field_banner_categories AS field_banner_categories ON field_banner_categories.pages_id=pages.id AND ((((field_banner_categories.data='1057') ) )) LEFT JOIN field_banner_sections AS field_banner_sections ON field_banner_sections.pages_id=pages.id AND ((((field_banner_sections.data='1057') ) )) WHERE ((((field_banner_categories.data='1057') ) ) OR (((field_banner_sections.data='1057') ) ) ) banner_custom_pages=1057 ---------------------------- SELECT SQL_NO_CACHE pages.id FROM `pages` JOIN field_banner_custom_pages AS field_banner_custom_pages ON field_banner_custom_pages.pages_id=pages.id AND ((((field_banner_custom_pages.data='1057') ) )) banner_position=sidebar, =(banner_categories|banner_sections=1057), =(banner_custom_pages=1057), status<1024 ---------------------------- SELECT SQL_NO_CACHE pages.id,pages.parent_id,pages.templates_id FROM `pages` JOIN field_banner_position AS field_banner_position ON field_banner_position.pages_id=pages.id AND (((field_banner_position.data='1' ) )) WHERE (pages.status<1024) AND ( pages.id IN ( SELECT SQL_NO_CACHE pages.id FROM `pages` LEFT JOIN field_banner_categories AS field_banner_categories ON field_banner_categories.pages_id=pages.id AND ((((field_banner_categories.data='1057') ) )) LEFT JOIN field_banner_sections AS field_banner_sections ON field_banner_sections.pages_id=pages.id AND ((((field_banner_sections.data='1057') ) )) WHERE ((((field_banner_categories.data='1057') ) ) OR (((field_banner_sections.data='1057') ) ) ) ) OR pages.id IN ( SELECT SQL_NO_CACHE pages.id FROM `pages` JOIN field_banner_custom_pages AS field_banner_custom_pages ON field_banner_custom_pages.pages_id=pages.id AND ((((field_banner_custom_pages.data='1057') ) )) ) ) GROUP BY pages.id I thought that it can be relative to "OR" selector banner_categories|banner_sections=$page So I tried $this->wire('pages')->find("banner_position=sidebar, (banner_sections=$page), (banner_custom_pages=$page)"); It also produces the same error. Any thought? Thanks.
  15. @SoccerGuy3 Glad that it helped. The name of your button is not 'submit', but 'submit_name', but in your initial code you check '$this->input->post->submit'. $f->attr('name', 'submit_save'); Also if you want to make your code more PWish you can rewrite it with https://processwire.com/api/ref/wire-database-p-d-o/
×
×
  • Create New...