Jump to content

Frank Vèssia

Members
  • Posts

    601
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Frank Vèssia

  1. I don't think it exists yet...
  2. I got this error during install (pw 3.0.159 dev) Edit: apparently I solved updating to the latest dev version 3.0.160
  3. Hi, it's ok, it was just the fact that github was down and I didn't notice it, so I thought you kind removed the module for some reason / imminent update, sorry ?
  4. Ops, didn't check github itself...thanks ?
  5. Any update? I can't download the module, even from github, it's no longer available?
  6. you can try to create the child page only after the parent is saved, like so: // create parent $p = new Page(); $p->template = 'basic-page'; $p->parent = $pages->get(1234); $p->title = 'Parent Page'; if($p->save()){ // create child $c = new Page(); $c->template = 'child-template'; $c->parent = $p;// new parent above $c->title = 'Child Page'; $c->save(); }
  7. hey @horst it's possible to override the smtp settings and use values on the fly while creating a wiremail instance? I have 3 different emails I need to use in my site. Thanks
  8. It's just a simple page creation $mainNode = $pages->get(1030); $today = date("Ymd"); $checkToday = $pages->get("name=$today"); if( !$checkToday->id ){ $td = new Page(); $td->parent = $mainNode; $td->template = $templates->get("day"); $td->title = $today; $td->save(); } and in my admin I call the panel which is that code It's a fresh PW install 3.0.148 wire()->addHookAfter('Dashboard::getPanels', function ($event) { $panels = $event->return; $panels->add([ 'panel' => 'template', 'title' => 'Excel import', 'size' => 'full', 'icon' => 'upload', 'data' => [ 'template' => 'dashboard/dashb_import.php' ] ]); });
  9. Hi @d'Hinnisdaël I'm using the module in all my projects now, very well done. Just one issue or something I missed to configure, when I'm using the template panel in which I need to create some pages based on buttons action I got PW fatar error class Page not found.
  10. Awesome module, I'm testing it right away for a small project I'm working on, keep rocking!
  11. At this point I think that something inside the DB is broken or so because the code is fine and always worked even in other applications, yes probably is something related with the roles because it happens only to non admin users and it happens also on logout where there is no login code involved. It is very strange, I also made a test displaying the current user language just before the logout with any issue and during logout I got the error $language undefined for the current user.... I like to be precise on what's happening by telling the users where is the problem instead of generic login error messages.
  12. I just tried with no luck, it seemed a reasonable solution ? get the same error when I perform session->logout()..but I don't understand, the user has the default language set...how can be null and why only non admin user? Good question lol
  13. after few more debugs I found out the issue Error: Call to a member function isDefault() on null in /home/iltuopre/public_html/wire/core/PagesLoaderCache.php:237 Any idea what is it?
  14. Having the same exact problem with users not superuser, can't login via API anymore because of this isDefault().... ?
  15. Hello, my login code is acting very strange, when a superuser is trying to login is working fine, with other roles the server crashes and I get server error 500. I tried to debug but I cannot find any explicable reason for this <?php if($input->post->email){ $email = $sanitizer->email($input->post->email); $pass = $sanitizer->text($input->post->password); $response = array(); $errors = ""; if($email == ''){ $response['type'] = "error"; $response['msg'] = "Email non valida"; echo json_encode($response); exit; } if( $pass == '' ){ $response['type'] = "error"; $response['msg'] = "Password non valida"; echo json_encode($response); exit; } $checkUser = $users->get("email=$email"); if($checkUser->id){ try { $uname = $checkUser->name; $user = $session->login($uname,$pass); if($user && $user->id && $user->id != 40){ $response['type'] = "success"; $response['msg'] = "Utente loggato"; }else{ $response['type'] = "error"; $response['msg'] = 'Password non valida. Riprova'; } } catch(WireException $e){ // in case of multiple false login (throttle login) $errors .= $e->getMessage(); } }else{ $response['type'] = "error"; $response['msg'] = 'Email non trovata.'; } if($errors != ''){ $response['type'] = "error"; $response['msg'] = $errors; } echo json_encode($response); }
  16. meanwhile I contacted the sys admin and it looks like there is some server misconfiguration we can't fix yet, when I upload the zip I found out that I cannot rename it, probably that's why the installer is stuck...but I was able to install a fresh PW..btw right now i can't show you the steps since we deleted everything and making tests
  17. Hello, thanks @Autofahrn that solved the problem but I still have an issue and I think it depends on the fact I'm running on a windows server with IIS (I reverted to php 7.3.13). While a fresh install of the latest PW is going well, the install from duplicator doesn't, I'm stuck in the extraction of the package, it looks like the $_SESSION['package'] returns null at this point but right after the extraction the session was ok, in fact I saw the name of the package in the previous step. Any thoughts? $this->package = $_SESSION['package']; if(is_null($this->package)) { $this->err("Something went wrong in the installer."); //ATO: Typo return false; }
  18. Hello, I have and issue with php 7.4 about a deprecated function get_magic_quotes_gpc() used inside the installer.php...any quick fix ? Thanks in advance
  19. hey @bernhard is this module still usable with latest PW? thanks
  20. nice, thanks bernhard!
  21. I'd like to add extra markup to a specific inputfield text in the admin using a module, I tried an hook like this but pw says the method doesn't exist $this->addHookBefore('Inputfield::render', $this, "addMarkup"); protected function addMarkup($event){ $Inputfield = $event->object; if($Inputfield->attr('name') == "myfieldname"){ $Inputfield->setMarkup([ 'item_content' => "my markup" ]); } }
  22. thanks, that's great, I will add the code and test it
  23. thanks for the quick reply. I have 2 parameters , api Client ID and api Client Secret of a rest api i'm accessing to retrieve some data. I insert those values manually one time. Now, when I use the API I'm getting in return another value, a PolicyKey (for another request) that I need to store for 6 days until it changes again, so I would like to store this value with the other two in the settings panel and I cannot insert it manually
  24. Hello @Macrura, great module. Can you please tell me a way to store a setting value using API instead of writing it in the setting page manually? thanks
  25. thanks @MoritzLost @adrian I know uppercase chars are bad but unfortunately the client wants few urls in that way as per documentation that I cannot change or discuss... can't do anything about it...
×
×
  • Create New...