showentry.php not working..

showentry.php not working..

por Alexis Maldonado -
Número de respostas: 11
For some reason when i click on an auto-link and it goes to "mod/glossary/showentry.php?courseid=2&concept=Navigate"
it does not display any search results. I've double checked all of my settings.

Help...

Media de puntuacións: -
En resposta a Alexis Maldonado

Re: showentry.php not working..

por Herbert Keijers -
Hi Alexis,
You wrote "I've double checked all of my settings".
Have you enabled it in the admin pages --> filter ?
En resposta a Herbert Keijers

Re: showentry.php not working..

por Alexis Maldonado -
Yes I've enabled it.. and the links are created throughout the course fine its just that when you click on them and the popup window shows up there are no results displayed.

Im using Postgresql.. might it be something with the db?

Thanks,..
En resposta a Alexis Maldonado

Re: showentry.php not working..

por Alexis Maldonado -
Can anyone confirm this as a real bug?
I have 3 moodle installs versions:
1.3.2
1.3.3
1.3.3

All running on Postgresql.
They all suffer from the same problem.
En resposta a Alexis Maldonado

Re: showentry.php not working..

por Eloy Lafuente (stronk7) -
Imaxe de Core developers Imaxe de Documentation writers Imaxe de Moodle HQ Imaxe de Peer reviewers Imaxe de Plugin developers Imaxe de Testers
Hi Alexis,

is your server in a public address? Can I gain access to it to see the problem in action (as admin, privately of course)? I've reviewed the SQL code used to retrieve the data in the popup window and I don't see any problem (for PostgreSQL) there...

Ciao sorriso
En resposta a Alexis Maldonado

Re: showentry.php not working..

por Alexis Maldonado -
ok here is what i get with debug on..

Notice: Undefined variable: glossary in /var/www/html/ctc/training/mod/glossary/showentry.php on line 25

ERROR: function ucase(character varying) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts.

select e.* from mdl_glossary_entries e, mdl_glossary g where e.glossaryid = g.id and (e.casesensitive != 0 and ucase(concept) = 'NAVIGATE' or e.casesensitive = 0 and concept = 'Navigate') and (g.course = 2 or g.globalglossary) and e.usedynalink != 0 and g.usedynalink != 0




I think that maybe my Postgres doesnt support ucase ??
strange..

the problem is mentioned here:

http://moodle.org/mod/forum/discuss.php?d=5275

and here:

http://moodle.org/mod/forum/discuss.php?d=5524#25548

but i thought these issues where fixed.. ?
En resposta a Alexis Maldonado

Re: showentry.php not working..

por Martin Dougiamas -
Imaxe de Core developers Imaxe de Documentation writers Imaxe de Moodle HQ Imaxe de Particularly helpful Moodlers Imaxe de Plugin developers Imaxe de Testers
Can you try Moodle 1.4 dev?
En resposta a Martin Dougiamas

Re: showentry.php not working..

por Paul Evans -
I am on dev version from cvs and have the same problem under postgres. I just noticed it now after I added a few hundred entries to a glossary (using Maxi's nice time-saver).

My copy is a few weeks behind cvs, so I'll grab showentry and see if that fixes it first, otherwise I'll fix it and post back coz I need this working.

Glad I found this thread - was out in the weeds looking through my setup to see what was wrong.

En resposta a Martin Dougiamas

Re: showentry.php not working..

por Paul Evans -
Sorry, I don't have time to fix this properly.

I suppose creating the table with 'globalglossary' as bool vs. int2 would fix the second problem. Not sure of the 'correct' (moodle-wise) fix for the first.

Here it is working under postgres:

$entries = get_records_sql("select e.* from

{$CFG->prefix}glossary_entries e, {$CFG->prefix}glossary g".
" WHERE e.glossaryid = g.id AND". " (e.casesensitive != 0 AND upper(concept) = '" . strtoupper(trim($concept)). "' OR". " (e.casesensitive = 0 AND concept = '$concept') ) AND". " (g.course = $courseid OR g.globalglossary = 1 ) AND". " e.usedynalink != 0 AND g.usedynalink != 0");

That is, I just changed ucase for 'upper' and added a test to g.globalglossary to produce a bool for the OR comparison.