Page Loads Fine, But Goes Blank on Page Select, Reorder, Search, etc

bunnyfly - April 1, 2008 - 00:04
Project:Ajax Table
Version:5.x-1.2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Hello - I am trying to build a static page view for a small library. The initial Ajaxtable page will load properly, showing the right data in the table, but if I click on another page number, or try the search box, or click one of the sort-by arrows, the little "searching icon" spins in the top right for a split second and then the table disappears - all that remains is the "Search for" bar. I thought it was my code, but then I copied off the bare basics from the tutorial, and got the same result. The examples in the documentation page work fine though.

Thanks so much in advance for the help!
[chloe]

Here is the stripped down version and also my code that both have this bug(?) on my site:

<p>&nbsp;</p>
<?php
function ajaxtable_table_ajaxtable_library($override='') {
 
ajaxtable_override($table,$override);
return
$table;
}
  print
ajaxtable_render("ajaxtable_library");
?>

<p>&nbsp;</p>
<?php

function ajaxtable_table_ajaxtable_library($override='') {
 
$override = array(
   
'rows' => 15,
   
'theme_override' => $theme,
   
'query' => ' SELECT * FROM {library} ',
   
'columns' => array( array( 'col' => 'id', 'label' => 'ID', 'sortable' => TRUE, 'searchable' => FALSE, 'default_sort' => 'desc', 'help' => 'ID.', ),
                        array(
'col' => 'format', 'label' => 'Genre/Format', 'sortable' => TRUE, 'searchable' => FALSE, 'default_sort' => 'desc', 'help' => 'Format or genre of the work.', ),
                        array(
'col' => 'title', 'label' => 'Title', 'sortable' => TRUE, 'searchable' => TRUE, 'help' => 'The title of the work.', ),
                        array(
'col' => 'author', 'label' => 'Author', 'sortable' => TRUE, 'searchable' => TRUE, 'help' => 'The author of the work.', ),
                        ),
    );

 
ajaxtable_override($table,$override);
  return
$table;
}

  print
ajaxtable_render("ajaxtable_library");
?>

#1

ryanp - April 1, 2008 - 15:09

I am having the exact same problem as listed above. I would greatly appreciate any help. Thanks In Advance.

#2

simonmd - April 28, 2008 - 23:09

Same here...help!!

#3

lienty - May 5, 2008 - 12:22

I am having the exact same problem to

#4

p_alexander - May 8, 2008 - 06:52

I have the same problem as well. Now, here's what's weird. The documentation page works fine. In fact, if I snip my code and place it into the documentation page, it works fine. Even further, if I strip out everything from the documentation module and create a custom menu item and page in a new module (basically works just like the documentation module, except the only thing output is my table), then everything is fine. Works great.

I can duplicate this using code taken straight from the documentation module and put into a PHP page.

After a little more digging, I think the module is failing when it tries to refresh. I think this happens on line 71 of ajaxtable.module:

if (!function_exists($function_name)) {

It looks like the function isn't passed from the page node I created back to the ajaxtable_render function in the module (if you copied the first example as a test, the missing function would be "ajaxtable_table_ajaxtable_example1").

I have zero idea how to fix this...any takers?

#5

p_alexander - May 8, 2008 - 18:59

This is also happening on the DEV release from May 1.

#6

p_alexander - May 8, 2008 - 19:01
Category:support request» bug report
Priority:normal» critical

#7

chrisshattuck - May 8, 2008 - 19:28

Hi folks,

Sorry I haven't been offering much support for this module as of late. I am currently working on an alternative module that will do what ajaxtable does, but with a UI (so little or no programming required!) and that is much more suited to becoming a powerful alternative to several applications of the Views module. It's a ways off from being done, but I'm concentrating my efforts on development on that module, and will leave the support of ajaxtable to the community in the interim period.

Thanks!
Chris

#8

vmijin - April 7, 2009 - 11:39

Yes, U must put function name into some module, not in template.php, cose it cnt find function name

 
 

Drupal is a registered trademark of Dries Buytaert.