Incorrect linking on database entries

Incorrect linking on database entries

by Tyler Gilpin -
Number of replies: 13

I don't know if this is a bug or not, but our database entry linking is incorrect. If I click the first entry, it opens the 3rd entry. If I click the 3rd entry it opens the 5th entry and so on. I've disabled "Database auto-linking with no change. This issue only happens on the "View list". I can view them individually without error. I've tested several database activties and receive the same issue. 

Does anyone know what's going on? We did not change any system files. The only updates done recently have been the security updates. Please help.

Attachment JCS Staff 2nd grade EnglishLanguage Arts - Google Chrome_2012-07-19_11-00-35.jpg
Average of ratings: -
In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Itamar Tzadok -

How the link is implemented in your view list?

The standard approach is to wrap the title text with an a tag as in <a href="##moreurl##">Title</a>. This should produce a link that goes where the magnifier link (##more##) goes.

smile

In reply to Itamar Tzadok

Re: Incorrect linking on database entries

by Tyler Gilpin -

I looked at other database activities and they don't have this problem. It's certain activitites within random courses. I thought it might be a preset issue. However, if I create a new database with the same preset the linking is OK. Somehow these specific activities got corrupted. How, i don't know. I guess I could fix them in the moodle DB.

In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Tyler Gilpin -

Anyone else know what's happening to my database activity records?

Thanks,
Tyler

In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Itamar Tzadok -

Hard to tell if you don't say how the link in the title is implemented. Check the html of the repeated entry section in the list template. smile

In reply to Itamar Tzadok

Re: Incorrect linking on database entries

by Tyler Gilpin -

We've never done this before. We just create the database activity input what we want and save. It works fine when I create a new database activitiy, but most of the current activities are linked incorrectly. If I click the first entry at the top of the list, it goes to the second entry and so on. I hope I don't have to go in the Moodle database and correct all of these manually. I don't understand why this happened all of the sudden. It's almost like the database activity module got corrupt. Where would I find the database activities and entries (records) in the moodle database? What table?

Thanks,
Tyler

In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Itamar Tzadok -

Afaict the linked title is not a standard behavior. Before you go to the DB you can check the template and the data.

What is the url of the title link of an entry? It can go either by record id (rid) or page.

How it is set in the list view template?

smile 

In reply to Itamar Tzadok

Re: Incorrect linking on database entries

by Tyler Gilpin -

OK. I checked the list template. It looks OK to me, but I could be wrong. We have several that have similar code and those work great. I've attached an image one with html code and one without.

Thanks,
Tyler

Attachment JCS Staff Kindergarten EnglishLanguage Arts - Google Chrome_2012-08-02_16-06-072.jpg
In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Itamar Tzadok -

This looks ok so see if Adrian's note below about the bug in 2.1 applies.  smile

In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Adrian Greeve -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers

This sounds very similar to a bug that was reported in the tracker: http://tracker.moodle.org/browse/MDL-33603

It's been resolved in Moodle 2.1 onwards.

You may just have to update to the latest patch of your version of Moodle.

Which version of Moodle are you using?

Average of ratings: Useful (2)
In reply to Adrian Greeve

Re: Incorrect linking on database entries

by Tyler Gilpin -

It does look similar to this bug, but not all our database entries are linked wrong. There are only a few database activities that are linked wrong. My Moodle version is 1.9.19 (Build: 20120706).

In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Tyler Gilpin -

I applied the 1.9 patch from the bug that was reported to my moodle version. It looks like that fixed it.

Thanks.

In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Stuart Mealor -

Awesome - thanks for reporting back that this solved your problem Tyler ... it will really help others reading this thread smile

In reply to Tyler Gilpin

Re: Incorrect linking on database entries

by Thomas Hutchins -

I am having what seem to be similar issues with a 1.9 installation.

I would be most appreciative if you could point me in the correct direction as to where the patch you mention can be found.

Thank you!