Link to author.php in items directory gives 404

Strange thing happens and I do not seem to solve it. File created that shows authors from the database works fine on one server but not on the new one.

file show.php works fine the same as tags.php (all in the items directory)

I am using version 1.3.2 can someone give me some direction how to solve this

thanks in advance!
bc

"author.php" is a file you added to your installation?

I'm not sure about your various server setups, but you generally extend Omeka with plugins, not by adding new .php files into existing directories.

Thank you, yes I did and it is working fine on one server but I copied to another server (as we are moving servers) and I get a 404.

Author.php is a file to display a list of authors.

can I pm you the address?

thanks
willem

Just to be clear, I made a backup, installed omeka on the new server, restored the backup, everything works except author.php.

can anyone help me?

thanks
bc

Can you say exactly where your author.php file is among the regular Omeka files? Generally, a file that Omeka doesn't know how to handle will and should give a 404, or maybe some other error.

Also, could you say a bit more about what author.php displays? It might be that there are other ways to get at the same data within the usual Omeka structures.

hi

thank you for helping
the file is in themes\mytheme\items

the content of the file is
(mind you this is working fine on the old server

I am trying to display a list with authors

<?php

$db = get_db();
$sql = "SELECT distinct text FROM omeka_element_texts WHERE element_id = 39 order by text";
$results = $db->fetchAll($sql);
//var_dump($results);

foreach ($results as $author) {
$search_text = $author['text'];

$sql = "SELECT COUNT(DISTINCT(i.id)) as record_count FROM omeka_items i ";
$sql .= "INNER JOIN omeka_element_texts etx ";
$sql .= "ON etx.record_id = i.id ";
$sql .= "INNER JOIN omeka_record_types rty ";
$sql .= "ON etx.record_type_id = rty.id ";
$sql .= "WHERE etx.text LIKE '%".str_replace("'","\'",$search_text)."%' ";
$sql .= "AND rty.name = 'Item' ";
$sql .= "AND etx.element_id = 39 ";
$sql .= "AND i.public = 1";

echo($sql."
");

$result2 = $db->fetchAll($sql);
$record_count = $result2[0]['record_count'];

?>
<li class="popular">&range=&collection=&type=&user=&tags=&public=&featured=&submit_search=Search"><?=$author['text']?> (<?=$record_count?>)

<?

}

?>

For that file structure, I would expect an error message like this, as long as you have error reporting turned on.

Action "authors" does not exist and was not trapped in __call()

Is it possible that you made changes to the application/controllers/ItemsController.php file that haven't been copied over to the new server? an authorsAction() function might do it.

It's also possible (though rare) that the element text id isn't the same across two different installations of Omeka, which could also cause unexpected behavior.