Jump to content

Hari KT

Members
  • Posts

    126
  • Joined

  • Last visited

Everything posted by Hari KT

  1. RT @CalEvans: Rule #0 for Software Developers“You are not the first one to have this problem. Use someone else’s solution before writing …

  2. RT @reinink: I once had a dream, but now that dream is gone from me. #laravel #psr2 https://t.co/Va7ynRBGh1

  3. RT @outlandishjosh: Open Source and Open Strategy. Announcing 2 hires I'm very pumped about: https://t.co/uqBui2VPfi (HT to @dries for the …

  4. Using Glide in Laravel 5 http://t.co/nHJZizAaSL . Great work @reinink . Awesome!

  5. RT @CaseySoftware: Check out my new Lynda course "Design Patterns in PHP": http://t.co/P5HiiGhiVJ I even cover @pmjones' new Action Domain …

  6. RT @pmjones: We're looking for a mid-level PHP dev! http://t.co/UJhaWwIcRH @postgresql, composer, @auraphp helpful; Nashville area, remote-…

  7. Reverting back to the old version fixed it. I was trying to update with the latest dev branch.
  8. Was going through the ajax request. Below is the error I have got TemplateFile: SQLSTATE[HY000]: General error: could not call class constructor #0 /var/www/ProcessWire/wire/core/Pages.php(0): PDOStatement->fetchObject() #1 /var/www/ProcessWire/wire/core/Pages.php(229): Pages->getById(Array, Array) #2 [internal function]: Pages->___find('parent_id=1, st...', Array) #3 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #4 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('find', Array) #5 /var/www/ProcessWire/wire/core/PageTraversal.php(78): Wire->__call('find', Array) #6 /var/www/ProcessWire/wire/core/PageTraversal.php(78): Pages->find('parent_id=1, st...', Array) #7 /var/www/ProcessWire/wire/core/Page.php(1033): PageTraversal->children(Object(Page), 'start=0, limit=...', Array) #8 /var/www/ProcessWire/wire/modules/Process/ProcessPageList/ProcessPageList.module(178): Page->children('start=0, limit=...') #9 [internal function]: ProcessPageList->___find('start=0, limit=...', Object(Page)) #10 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #11 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('find', Array) #12 /var/www/ProcessWire/wire/modules/Process/ProcessPageList/ProcessPageList.module(165): Wire->__call('find', Array) #13 /var/www/ProcessWire/wire/modules/Process/ProcessPageList/ProcessPageList.module(165): ProcessPageList->find('start=0, limit=...', Object(Page)) #14 /var/www/ProcessWire/wire/modules/Process/ProcessPageList/ProcessPageList.module(109): ProcessPageList->render() #15 [internal function]: ProcessPageList->___execute() #16 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #17 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('execute', Array) #18 /var/www/ProcessWire/wire/core/ProcessController.php(213): Wire->__call('execute', Array) #19 /var/www/ProcessWire/wire/core/ProcessController.php(213): ProcessPageList->execute() #20 [internal function]: ProcessController->___execute() #21 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #22 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('execute', Array) #23 /var/www/ProcessWire/wire/core/admin.php(85): Wire->__call('execute', Array) #24 /var/www/ProcessWire/wire/core/admin.php(85): ProcessController->execute() #25 /var/www/ProcessWire/site/modules/AdminThemeThinktag/controller.php(13): require('/var/www/Proces...') #26 /var/www/ProcessWire/site/templates/admin.php(13): require('/var/www/Proces...') #27 /var/www/ProcessWire/wire/core/TemplateFile.php(169): require('/var/www/Proces...') #28 [internal function]: TemplateFile->___render() #29 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #30 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('render', Array) #31 /var/www/ProcessWire/wire/modules/PageRender.module(356): Wire->__call('render', Array) #32 /var/www/ProcessWire/wire/modules/PageRender.module(356): TemplateFile->render() #33 [internal function]: PageRender->___renderPage(Object(HookEvent)) #34 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #35 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('renderPage', Array) #36 /var/www/ProcessWire/wire/core/Wire.php(387): Wire->__call('renderPage', Array) #37 /var/www/ProcessWire/wire/core/Wire.php(387): PageRender->renderPage(Object(HookEvent)) #38 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('render', Array) #39 /var/www/ProcessWire/wire/modules/Process/ProcessPageView.module(172): Wire->__call('render', Array) #40 /var/www/ProcessWire/wire/modules/Process/ProcessPageView.module(172): Page->render() #41 [internal function]: ProcessPageView->___execute() #42 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #43 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('execute', Array) #44 /var/www/ProcessWire/index.php(195): Wire->__call('execute', Array) #45 /var/www/ProcessWire/index.php(195): ProcessPageView->execute() #46 {main}
  9. Hi, From the processwire page tree listing, I am getting a strange error SQLSTATE[HY000]: General error: could not call class constructor I am looking at http://blog.boringguys.com/2010/11/sqlstatehy000-general-error-could-not.html when I noticed the same. I have added a few fields and upgraded to latest version of PW in dev branch. Any help to fix the page tree is appreciated. Thank you
  10. RT @Crell: PSR-7 current status: https://t.co/8vU2aIc8jZ - Feedback welcome, esp from framework authors! #PHP

  11. Hi Soma, I understood you need to pass all the fields that are required. If you miss a field, all the errors are thrown than throwing the missing one. I have also added a way to iterate through the fields and set the value on the Page. foreach ($form->getIterator() as $field) { $f = $field->name; $page->{$f} = $this->input->post->{$f}; } Thanks!
  12. RT @mwop: For the UTC-8 crowd: PSR-7 by example: http://t.co/Vw92ysYf3i #php @phpfig #http

  13. Hi Soma, I was trying the code $p = new Page(); $p->template = "basic-page"; $p->parent = 1; $in = new WireInputData(); $in->setArray(array("title" => "Hello World")); $form = $modules->InputfieldForm; foreach($p->fields as $field){ $inputfield = $field->getInputfield($p); $form->add($inputfield); } $form->protectCSRF = false; $form->processInput($in); foreach( $form->getErrors() as $err ) { $content .= $err; } but even if there is title it is showing title is empty on the errors. Do you know what may be the reason ? Thank you.
  14. RT @codebyjeff: Amazes me the number of hours we waste fixing things from bad decisions, and yet still everyone thinks "I'll just get this …

  15. RT @giorgiosironi: Framework Upgrade Driven Development #ZF3 #Symfony3 #Angular2

  16. RT @andigutmans: Latest PHP 7 benchmarks are really impressive!! #php #zend http://t.co/l2v7XTs3wG

  17. Hi Soma, I am trying to build some REST sort api. Thank you
  18. RT @beausimensen: The winner of the first "twig" #ossart print is @shochdoerfer! Find me after my @stackphp in ~1 hour. :)#phpbnl15 htt…

  19. Hi @Soma, The above mentioned one is saving the page first. My idea is to validate the fields before I save the page.
  20. Basically what I am doing is trying to build the form depending on the template . public function buildForm() { $form = $this->modules->get('InputfieldForm'); $form->set('protectCSRF', false); $template = $this->templates->get($template); foreach ($template->fields as $field) { $f = $this->modules->get('InputfieldText'); $f->name = $field->get('name'); $f->required = $field->get('required'); $form->add($f); } return $form; } So I could do a $form->processInput($this->input->post); One of the problem here is the field is always Text. Is there a better way to pass the field to the form, so the other properties can also be validated. Eg : Email, Url etc. Also even there is input with post values it is showing error, that the value is required in $form->getErrorrs() Thank you.
  21. Hi, I was looking whether I can validate the page before it is saved and get errors . Eg : $page = new Page(); $page->template = 'some-template'; $page->field1 = 'some-value'; $page->setOutputFormatting(true); $page->save(); Assume there is $page->field2 which is also required. Is there a way I can validate and get the errors?
  22. I thought it was really @ArvindKejriwal calling me, and finally I understood it was a recorded call :P .

×
×
  • Create New...