showentry.php not working..

showentry.php not working..

د Alexis Maldonado لخوا -
د ځوابونو شمیر: 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...

د درجې بندۍ اوسط:  -
In reply to Alexis Maldonado

Re: showentry.php not working..

د Herbert Keijers لخوا -
Hi Alexis,
You wrote "I've double checked all of my settings".
Have you enabled it in the admin pages --> filter ?
In reply to Herbert Keijers

Re: showentry.php not working..

د 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,..
In reply to Alexis Maldonado

Re: showentry.php not working..

د 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.
In reply to Alexis Maldonado

Re: showentry.php not working..

د Eloy Lafuente (stronk7) لخوا -
د Core developers انځور د Documentation writers انځور د Moodle HQ انځور د Peer reviewers انځور د Plugin developers انځور د 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 موسکا
In reply to Alexis Maldonado

Re: showentry.php not working..

د 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.. ?
In reply to Alexis Maldonado

Re: showentry.php not working..

د Martin Dougiamas لخوا -
د Core developers انځور د Documentation writers انځور د Moodle HQ انځور د Particularly helpful Moodlers انځور د Plugin developers انځور د Testers انځور
Can you try Moodle 1.4 dev?
In reply to Martin Dougiamas

Re: showentry.php not working..

د 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.

In reply to Martin Dougiamas

Re: showentry.php not working..

د 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.