Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by blacksrv

  1. Edit: I found the problem, I was using the filter method, and that was causing the missing pages. Thank you!
  2. Hi All, I'm using the descendants() method to get all childrens, grandchildrens, great-grandchildrens, my structure is something like this: /page/ /article/ /article/ /subcategory/ /article/ My results using: $page->descendants() ProcessWire\PageArray Object ( [count] => 2 [total] => 4 [start] => 0 [limit] => 0 [pager] => 1 to 2 of 4 [items] => Array ( [Page:0] => Array ( [id] => 2 [name] => article1 [parent] => /page/ [template] => article [title] => Article1 ) [Page:1] => Array ( [id] => 3 [name] => article2 [parent] => /page/ [template] => article [title] => Article2 ) ) [itemsRemoved] => Array ( [0] => Array ( [id] => 4 [name] => subcategory [parent] => /page/ [template] => category [numChildren] => 1 [title] => Subcategory ) [1] => Array ( [id] => 5 [name] => article3 [parent] => /page/subcategory/ [template] => article [title] => Article3 ) ) [selectors] => has_parent=1, include=all ) I am receiving only direct descendants as long as they are empty. I'm not sure if I'm missing something or if it's not the right function. Thanks!
  3. @BillH, I hadn't thought of that alternative, however, that would leave all the files in 1 folder, I don't know if it would work. @bernhard, not 100% sure, I'm currently emptying the empty folders, however it's not a permanent fix. Any idea how I could prove if it is indeed the folders? I/O monitor does not show any peak loads. @teppo I didn't know about this, I'll set up a local copy and do the test, thanks.
  4. @louisstephens, Users with a single image field, and it does not matter if it's empty, the folder is created anyway.
  5. Hello to all, I'm facing some issues with folders being created by PW, I have about 1 million pages, and each time a new page is created it takes about 10s to complete the save. is possible to change the current behavior to create / re order the folders created to be inside a subfolder by date / month / day ? Any other Ideas? Thank you!
  6. Yes I know, but it's not working, in both file I have $config->debug = true;
  7. I notice I can overwrite it in wire/config.php, but still not working, any ideas? Thanks
  8. Hi everyone, I'm having some issues with a checkbox list: I have a "select options" field with multiples checkbox, and I need to add an attr to each checkbox. Is possible to do it without JS? Thanks
  9. Nevermind, was a stupid error on a prepend file.
  10. Hi, I got this error after login to the backend: Already tried to delete cache, disable all modules, update processwire to lastest version, nothing works. Any idea of this error?
  11. Hi, I'm having some issues with PW after a NGINX error, I'll try to elaborate: 1) My nginx site conf file went corrupt. 2) try to recreate it using: https://processwire.com/talk/topic/275-processwire-on-nginx/ 3) All my urls are accesible using '/' or without it. 4) I have urls that doesn't work without the / at the end, the url is dynamic (I check for the segments) Ex: "www.url.com/something/countries/usa" works! "www.url.com/something/countries/usa/" works! "www.url.com/something/countries/mexico/" works! "www.url.com/something/countries/mexico" doesn't work I assume it has something to do with my nginx, it only happens with the same country, in fact if you use a country that doesn't exist it just redirect you to the main url, but in 'mexico' case it just return a 404. Any ideas??? edit: something I forgot I testing adding it a backslash to all urls but the backend has some troubles when it comes to saving.
  12. just tested with 2.8, not working for me.
  13. is possible to add some graphics in the frontend? Using hanna or directly php? Thanks
  14. I'm having a strange problem with CSRF, hasValidToken() only works on internal pages and not on the homepage. The weird thing: is the same form, I have a modal in the footer, so every single page uses the same form. If I register using an internal page it works fine, if I use the homepage to register, the csrf token returns error. This is what I use to validate: if ( ! $this->session->CSRF->hasValidToken() ) { $errors['csrf'] = __( "Form submit was not valid, please try again." ); } Any ideas?
  15. Hi, did you find the error? I'm having the exact same problem.
  16. Thanks @kongondo, I was hoping to skip writing some code, I have several templates and pages using the same field. Thanks again.
  17. Hi, I'm having some troubles sorting pages by a number. I have a field that counts views, but I created using text instead of integer. When I search all items and then do a filter like: $pages->filter("sort=-views_count"); It sorts correctly, but if I do: $pages->find("sort=-views_count"); it doesn't sort correctly. I tested it on the backend and the error exists, if the fieldtype is text the sort is something like: 1411 14690 1478 14890 1502 if it's an integer the sort is correct. Is possible to convert a text to an integer? from the backend the option doesn't exists. Thanks
  18. There is something weird happening, I'll start uninstalling plugins to see if something is messing up with that. Thanks adrian for your help.
  19. Yes, I notice my error and correct it. It returns '4930'.
  20. I'm getting crazy with this, after 4 hours with the same I really don't have a clue.Let see: $u = $users->get(4930); if ( $u->id ) { echo '$name: '.$u->name.' - id:'.$u->id; $session->forceLogin($u); } It returns: Ok, when I add on: https://github.com/ryancramerdesign/ProcessWire/blob/980ce4f0be2054dfbad4a7b334d35bdca42da7da/wire/core/Session.php#L435 echo $name;it return a "guest", so no $name is getting into that function.Edit: Updated to 2.7.3 (was using 2.7.2) still the same. Edit 2: echoed on 506 session.php returns correct id, but echo on 436 return 'guest'.
  21. First of all, thank your the help. Now I'm using $u as the var, but nothing changes. What you are saying about $name = self::passwordGen(), is when facebook doesn't provide the email. I tested with a blank user and an existing one but it's the same. I'll try to do a re write and see where I made the mistake. Edit: I have no idea why this code is no working: $u = $users->get( "4930" ); if ( $u->id ) { $name = $u->name; $pass = 'Demo123'; $login = $session->login($name, $pass); $session->forceLogin($u); $users->setCurrentUser($u); }I got 2 errors: guest http://localhost/ Error: Failed login for 'guest' - Guest user may not login (of course id 4930 exists), so it's trying 2 times.
  22. passwordGen is just a pass generator, is working. In my code I delete a commented line with an echo with the name and pass. Was indented in my paste, I'll check next time. Edit: I have the same problem in the Forgot Password Module, according to the log: 2016-03-01 21:05:39 guest social-login/?provider=facebook Error: Failed login for 'guest' - Guest user may not login
  • Create New...