• Content count

  • Joined

  • Last visited

Community Reputation

29 Excellent

About Karl_T

  • Rank
    Full Member

Contact Methods

  • Website URL

Profile Information

  • Gender

Recent Profile Visitors

739 profile views
  1. Fixed. The time of modified, created and changlog(module) is reading the database server timezone. I am using a remote database, so the timezone is different from the web server. The issue fixed after changing the remote database server timezone.
  2. Greeting. I am having hard time trying to make the time inside processwire correct. I have a correct server time. I have a correct time zone inside config.php, echo correctly in php. I get correct timestamp when echo in php and using tracy debugger console. However, the time stored for creation, modified, changelog are all using Unix Timestamp, i.e. UTC, while my correct time should be UTC+8. What is the possible config having this behavior?
  3. I would like to save very long string to a text field. My case is that I am saving canvas serialized data into text field for saving as state. However, the the text link cannot excceed certain length which is around 66535 something even though I set the field's max length as 0. What I can do to release the limit? Thanks.
  4. Module

    Thanks for this wonderful module. When SVG is used in image field, the download button is not appearing. I hope it can be there.
  5. Sorry this is my own fault. The issue arouse because I have written a hook to 'login', editing some pages that do not exist in new account.
  6. register ajax code $email = $sanitizer->email($input->post->email); if($email){ $emailUser = $users->get("email=$email"); if (!$emailUser->id) { $password = $input->post->password; if (strlen($_POST["password"]) < 8) { return "length"; } $firstname = $sanitizer->text($input->post->firstname); $lastname = $sanitizer->text($input->post->lastname); $u = new User(); $u->name = $firstname.$lastname.uniqid(); $u->email = $email; $u->pass = $input->post->password; $u->firstName = $firstname; $u->lastName = $lastname; if($u->save()){ return "success"; } } else { return "duplicate"; } }else{ return "invalidemail"; } login ajax code $email = $sanitizer->email($input->post->email); if($email){ $emailUser = $users->get("email=$email"); //user login with email address if ($emailUser->id) { $u = $session->login($emailUser->name, $input->post->password); if ($u) { $user = $u; return "success"; } else { return "fail"; } } else { return "fail"; } } After users register an account and login with the above code, I get the follow error when executing the login ajax code. Notice: Trying to get property of non-object in /var/app/current/wire/core/PagesEditor.php on line 251 Notice: Trying to get property of non-object in /var/app/current/wire/core/PagesEditor.php on line 254 Notice: Trying to get property of non-object in /var/app/current/wire/core/PagesEditor.php on line 263 Notice: Trying to get property of non-object in /var/app/current/site/assets/cache/FileCompiler/site/modules/ProcessSetupPageName/ProcessSetupPageName.module on line 258 Notice: Trying to get property of non-object in /var/app/current/site/assets/cache/FileCompiler/site/modules/ProcessSetupPageName/ProcessSetupPageName.module on line 258 Notice: Trying to get property of non-object in /var/app/current/site/assets/cache/FileCompiler/site/modules/ProcessSetupPageName/ProcessSetupPageName.module on line 289 Fatal error: Uncaught Error: Call to a member function numChildren() on null in /var/app/current/wire/core/PagesEditor.php:270 Stack trace: #0 /var/app/current/wire/core/Pages.php(788): ProcessWire\PagesEditor->setupNew(Object(ProcessWire\NullPage)) #1 /var/app/current/wire/core/Wire.php(383): ProcessWire\Pages->___setupNew(Object(ProcessWire\NullPage)) #2 /var/app/current/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___setupNew', Array) #3 /var/app/current/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Pages), 'setupNew', Array) #4 /var/app/current/wire/core/PagesEditor.php(465): ProcessWire\Wire->__call('setupNew', Array) #5 /var/app/current/wire/core/Pages.php(410): ProcessWire\PagesEditor->save(Object(ProcessWire\NullPage), Array) #6 /var/app/current/wire/core/Wire.php(386): ProcessWire\Pages->___save(Object(ProcessWire\NullPage), Array) #7 /var/app/current/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___save', Array) #8 /var/app/current/wire/core/Wire.php(4 in /var/app/current/wire/core/PagesEditor.php on line 270 Error: Uncaught Error: Call to a member function numChildren() on null in /var/app/current/wire/core/PagesEditor.php:270 I have no idea why this is happening. The account is newly created from the register code with no error. After the error show, the account is actually logged in after a page reload. That means the $session->login is getting the correct arguments. The error messages do not show the exact line of code which fires the error. I use the same login to log in my superuser without error. The error occurs only when the user is newly created by the above code or by the admin panel. I can only find this similar case https://processwire.com/talk/topic/15204-cannot-login-errors-wirecorepageseditorphp/, but it seems not the same case. Any thoughts? Thanks in advance.
  7. I have made a pull request. You may take the changes for use before the module update. Code changes to support ListerPro
  8. Thanks @arjen again for the reference links. If I could fix this I would post the fix here. This module is best suit for my new project but it just lacks the ListerPro support.
  9. Thank you @arjen. I tried all the hooks that Ryan mentioned in the post and some others but unfortunately no one seems to be working. I have checked ProcessChangelog to see what hook it uses to fix the issue as I also have used it for other projects. It works along with ListerPro after update and what it use is the saveFieldReady hook but just cannot simply apply the same change to this module.
  10. Thanks for this great module. I would like to use it along with ListerPro but no luck as @arjen mentioned. Before the release of update, I have tried to fixed this by adding $this->pages->addHookAfter('saveFieldReady', $this, 'hookUpdateLog'); but it is not working. How can it be fixed? thanks
  11. Session lock is added finally. I also make a pull request to netcarver's SessionHandlerRedis. Once it is done I will close this one and move to that one probably. FYI: phpredis is undergoing a pull request to add their session lock.
  12. Sorry for your time. This is the lack of session lock issue inside my own Redis module. I have to find time to fix that. Reference: https://github.com/processwire/processwire-issues/issues/132
  13. Thanks for your reply. The issue seems to be the duplication of sort index. I think the sort index is generated and then handled by PW, isn't it? Would you mind telling me any other possibilities so that I can check on them?
  14. Every time I upload multiple images to any image fields at the same time, no matter I drag multiple or choose multiple images, most files randomly not uploaded. Most of the time only the first image is uploaded. The error message is SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2276-0' for key 'PRIMARY' INSERT INTO `field_images` (pages_id, sort, `data`, `description`, `modified`, `created`) VALUES(2276, 0, 'twitter-1.svg', '[\"\"]', '2017-05-28 13:04:54', '1970-01-01 08:00:10') So, it seem like this is because of the duplicated sort index. If I drag images into the field or choose the images one by one, there is no issue. That means when multiple files are uploaded, the sort index generated are the same most of the time. This most likely is PW side issue, but I tested this in a fresh installed PW without issues. This just happens in that particular server. I have updated PW to latest from 3.060 to 3.063dev. The issue still persists. Thanks.
  15. Looks like it is a good place to extend for my need. Thanks a lot! Right now there are too much fields to choose from. This will make my customer nervous.