Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

10 Good

About cehlo

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hmm, maybe try to explain better. Formbuilder is not used for creating pages, it is used for creating forms and saving input in meaningful manner to PW. You can just insert created form with formbuilder to any template on frontend, it is not connected to creating pages and templates as far as I know.
  2. Hi there, first the answer depends on that if your array "children" is PageArray. If yes I believe if you want currently viewed page you must check if child->id is simalar like page->id not parent->id. Secondly if you want to check if checkbox is checked the right way will be: $child->checkbox_field == 1 Also I think you know this but else if must be put before else statement :D. Lastly maybe consider using custom menu builder for this. Menu Builder. In addition this checking can be done before building actual markup for menu. So you can consider this solution an then you won't need else if. $menuPages = $pages->find('menu_item=1'); //and add additional selectors for template etc., also you can use selector like this for method children() Cheers.
  3. It is very strange, when I used bardump in tracy console during this error with same line: bd($this->user->language->isDefault()) no error in tracy. I am just rubbing my head on this for like 4 hours and can't find no error or the cause of this. I even try fresh install of pw, imported database and site folder with no help. Then deleted ready file, all modules files still problem persists... Adding also some more error description from debugModelPanel. Thanks for help in advance.
  4. Maybe little bit old, but again same error. Now I can't save or edit user profile for another user than superuser. I am not currently changing by any means edit profile module nor hooking it. And this is popping out. Maybe at least some advice how to track error more precisely, because now is only forwarding me to LoaderCache and there is no problem. Thank you very much.
  5. Hi there, If I understand correctly you don't want to have selected none page? If that is the case, just drop down pages for select, find that one which is selected and choose "unselect".
  6. Hi guys, I am just thinking about purchasing Form Builder. First, I want to ask if it is possible to generate forms also on backend custom pages, because in description of module is written only about generation forms in frontend? You would ask why would I want to use forms in backend. There are some events, which I want to create online registration for - different for members - they will log in and It will automatically load information from their accounts to forms, on the other hand there will be different form for users which do not have accounts on frontend. Thank you for your assistance. Cheers Cehlo
  7. Thank you, that save my day :).
  8. Hi guys, just one shor question maybe just for my insight. When we are using PageArray like array of pages, it is possible to have same page in there twice? Specific problem - I had created method to generate pedigree of dog with 30 ancestors. It is PageArray and order of pages / dogs is important here to generate fronted output. So, You know dogs are not very monogamic and inside one pedigree it is possible that one male ancestor is there multiple times. So problem is that during generation of this PageArray, when there is second occurence of same page / ancestor, first will disapper. So my question is - is not possible to have same page multiple times in Page Array or should I look for some errors in my code (which I did not find for now) ? <?php // It is not same code, but this is all according to manipulation with pageArray I am using when I am creating PageArray $pedigree = new PageArray(); $pedigree->add($ancestor_page); ?> Thank you for your answers. Cheers B.
  9. Hi there, I do not know where the problem is, but the notice is not showing when users are logout. It is showing only when logged in as superuser (on frontend, or module configuration page). Any Ideas what could be the problem? Also I tried to reinstall module, refrech cache, clear local storage. Still I tried it on various devices, cookie notice is nowhere to be found. Thank you very much.
  10. Hi folks, do you have some ideas to my problem? I can´t really find the solution. When I am editing any page with different role than admin the top processwire menu disappears. Only happens while editing. See photo. Thank you very much for any help. Cheers.
  11. Hi folks, I am reaching you one more time for help with error I can´t solve. The setup is little more complicated, but I will try to introduce it in the best way. I have multiple user roles, one of them is role "member". These members have certain pages that they can edit, permission is granted during some automated process ( request for permission to edit, check if it is authorized, grant permission - via custom modules and hooks) but permission for editing is saved via module "PageEditPerUser". This pages which "member" can edit, have PageReference field, which is pointing on that user (Access - Users - Page of user) - field is called "dog_ownerSelect" and is used for loading personal data of owner = authorized user to page. Problem appears when the member is logged into processwire and he want to see pages which he can edit on live site. Return is only some error which does not seem have sense. On site traditionally error 500, because it is not superuser - output from tracydebugger error log is: [2019-11-03 10-30-56] PHP Notice: Undefined property: ProcessWire\User::$language in /nfsmnt/hosting1_1/b/5/b5ca8bf7-6179-408f-b688-09da79c8a644/daisy.sk/sub/hovawart/wire/core/PagesLoaderCache.php:236 @ https://hovawart.daisy.sk/databaza-chovu/chov/dajana-z-posonia/ When I added TracyDebugger permission to member, result: Call to a member function isDefault() on null. I am using $language in multiple places but that doesn't seem to be problem. I traced the error in file to using variable "dog_ownerSelect" in any way. <?php if(!$page->dog_ownerSelect){ } else { } ?> If there is this variable (which is pointing to user who is logged in) in any place in the file, it throws error I described. But this error occurs only if the user with role member is trying to look the page which he can edit. When you try to load page with guest or superuser or other member which doesn't have right to edit this page everything is going 100% smooth. Thank you for any suggestion where the error might be. Cheers Cehlo
  12. Thank you all. WillyC hit it. That was my one little mistake 🙂
  13. Hello, i just hit another problem. Maybe is very easy, but I can not find the place where I am having error. So I am doing some admin custom page - it shows requests from users for administrator. Administrator checks request and then should hit button approve or delete request. I am done this by creating table, and for each row in template I want to add also link with some data for GET. Problem is that table for some reason does not encode/render the link proper way - it only output html markup. (image 1, 2). Maybe I am missing something important? My relevant part of code below: <?php class ProcessRequests extends Process { public function init() { parent::init(); // required } public function ___execute() { $requests = new WireArray(); $match = $this->pages->find("template=request"); $requests->import($match); $requests->unique(); $requests->sort("-created"); $count = count($requests); if ($count) { $url = $this->config->urls->admin . 'page/edit/?id='; $table = $this->modules->get('MarkupAdminDataTable'); $table->setSortable(true); $table->setEncodeEntities(true); $table->headerRow(array( $this->_('#'), $this->_('Názov žiadosti'), $this->_('Typ žiadosti'), $this->_('Týka sa psa'), $this->_('Žiadosť podal'), $this->_('Vytvorená'), $this->_('Akcia'), )); foreach ($requests as $key => $u) { $mailer = $this->pages->get($u->request_mailer_id); $dog_ref = $this->pages->get($u->request_dog_reference->id); $table->row(array( $count - $key, $u->title => $url . $u->id, $u->request_type->title, $dog_ref->title => $url . $dog_ref->id, $mailer->name, date('Y.m.d - H:i', $u->created), "<a href=''>Schváliť</a>", )); } $out .= $table->render(); } else { $out .= "<p>" . $this->_("Well done, all dogs are edited.") . "</p>"; } return $out; } } Thanks for any replies :).
  14. The solution with module suggested by Adrian works perfectly, no more headaches. My problem was that the field dog-father and dog mother are fields Page Autocomplete, but with query selector, for dog_mother -> show only pages of template where dog_sex = female and for dog_father ->show only pages of template where dog_sex = male. So when I create new page via Autocomplete by hitting enter, it does not populate created page in field because, created page have no dog_sex setting saved, only title when doing it this way. Now I create all page in modal, dog_sex is required field so, problem solved.
  15. Yes, you understand perfectly 🙂 Thank you very much, you spare me from a long headache 😄 But in all cases how would be the correct way to return created page id with that hook? Is it even possible?
  • Create New...