⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

an error has occurred on saving and insert,



Ade Pramono AR

Ade Pramono AR
  • profile picture
  • Member

Posted 01 February 2017 - 06:11 AM

how to solve the error: an error has occurred on saving and insert

 

when in localhost no problem,
all processes run well, like where to overcome it.
 
is there any special settings for server colocation us, thanks

 

crud.png

no notification line error in php code

 


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 01 February 2017 - 06:22 AM

well - i will recommend u check the ouput of server side (php) in the console .. for the network call. U may find the actual error whats causing the problem - It may be some notice message thats being pushed out - do check.

 

Happy GCIng :)


aduran

aduran
  • profile picture
  • Member

Posted 19 October 2017 - 09:49 AM

Hi there,

 

i have the issue with no notification line error in php code, anyone knows how to fix it ? 

 

Regards! 


aduran

aduran
  • profile picture
  • Member

Posted 19 October 2017 - 10:27 AM

ERROR - 2017-10-19 12:17:30 --> Severity: error --> Exception: Too few arguments to function Myigniter::slug_page_check(), 1 passed in D:\xampp\htdocs\application\libraries\Grocery_CRUD.php on line 913 and exactly 2 expected D:\xampp\htdocs\application\controllers\Myigniter.php 624
 
/**
     * Callback Slug if exist.
     *
     * @return array
     **/
    public function slug_page_check($post_array, $primary_key)
    {
        $slug = $post_array['slug'];
        $lower = strtolower($slug);
        $slug = str_replace(' ', '-', $lower);

        $this->db->where('slug', $slug);
        $get = $this->db->get('page');
        if ($get->num_rows() != 0) {
            if ($get->row()->id_page != $primary_key) {
                $slug = $slug.$get->num_rows();
            }
        }
        $post_array['slug'] = $slug;

        // Option breadcrumb link
        foreach ($post_array['label'] as $key => $value) {
            if ($value != '') {
                $link = $post_array['link'][$key] != '' ? $post_array['link'][$key] : '';
                $crumbArray[] = ['label' => $value, 'link' => $link];
            }
        }
        $post_array['breadcrumb'] = json_encode($crumbArray);

        return $post_array;
    }