Jump to content


Update of page causes infinite hang.

TypeError Update defaultView add

  • Please log in to reply
3 replies to this topic

#1 Adamantus

Adamantus

    Member

  • Members
  • PipPip
  • 19 posts

Posted 30 January 2013 - 02:45 PM

For some reason my pages are coming back with this error in the error console when I try to save. Pages hardly ever save properly and just grind away forever.

Timestamp: 30/01/2013 14:37:35
Error: TypeError: doc.defaultView is null
Source File: chrome://browserrecord/content/browserrecordloader.js
Line: 645

Here is my controller method for this section:

function pages()
{
    $crud = new grocery_CRUD();

    $crud->set_table( $this->router->method )
	    ->set_subject( 'page' )
	    ->columns('name','uri_name','description','date_post','author','row_num','sub_links','url','tags','slider') //Columns on display.
	    ->display_as('uri_name','Name to match against')
	    ->display_as('description','Description')
	    ->display_as('tags','Search Keywords')
	    ->display_as('row_num','Box Colour / Group')
	    ->display_as('url','Complete url (for links)')
	    ->display_as('slider','Add Slider?');

    //Add / Edit methods.
    $crud->fields('name','uri_name','url','description','date_post','author','row_num','sub_links','tags','slider'); //Fields to display for add / edit.
   
    //Hidden auto-filled fields.
    $crud->change_field_type('date_post', 'datetime', date('d-m-Y h:i:s',time()) );
    $crud->change_field_type('author', 'hidden', $this->session->userdata('userId') );
   
    $uri_name = isset($_POST['uri_name']) ? $_POST['uri_name'] : '';
    $url = $this->options->company->groc_images_path.'/'.$uri_name;
   
    //$crud->change_field_type('url', 'hidden', $url); //Process this using a callback to autofill below.
    //Drop down menus. Selects some info from a database table and uses it to populate the drop down menu.
    $crud->set_relation('sub_links', 'gc_bool', 'name');
    $crud->set_relation('slider', 'gc_bool', 'name');
    $crud->set_relation('row_num', 'gc_rows', 'name');
    $crud->set_relation('author', 'users', 'userName');
   
    $crud->required_fields('name','uri_name','description','date_post','author','row_num','sub_links'); //Required fields / form validation.
   
    $output = $crud->render();//Set output variable for view.
    $output->css_files[] = base_url().'css/grocery_crud.css';

    //$this->_example_output($output);//Send to view. 
    $this->_example_output($output);
}


#2 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 31 January 2013 - 12:18 AM

Can you explain this line a bit more?

$output->css_files[] = base_url().'css/grocery_crud.css';

____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#3 Adamantus

Adamantus

    Member

  • Members
  • PipPip
  • 19 posts

Posted 31 January 2013 - 10:38 AM

Hi David. I'm using a loop to print out the custom css / js files. Here is the code in the view:

<?php
foreach($css_files as $file): ?>
    <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
    <script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>

The base_url() just contains the path to the website and I've added the css location on to the end.

#4 Adamantus

Adamantus

    Member

  • Members
  • PipPip
  • 19 posts

Posted 31 January 2013 - 01:26 PM

Actually in hindsight it seems to be working fine at work (same browser version). I think it must be something to do with addons I have installed at home. Although that error is puzzling.





Also tagged with one or more of these keywords: TypeError, Update, defaultView, add

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users