broken links after restore: $@FORUMVIEWBYID*2571@$

broken links after restore: $@FORUMVIEWBYID*2571@$

by Gavin Stokes -
Number of replies: 4
When importing data from another course, links to a forum in a meta course are broken.
The link changes from the original path:
http://utopia.natcoll.ac.nz/moodle/mod/forum/view.php?id=2571
to some strange reference:
$@FORUMVIEWBYID*2571@$
and the resource cannot be found.

If I create a label, with the link attached to some text, the import process works fine. I could replace all my links to the forums in the meta course with labels, but that's not a great solution.

any help greatly appreciated!
thanks,
Gavin
Average of ratings: -
In reply to Gavin Stokes

Re: broken links after restore: $@FORUMVIEWBYID*2571@$

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Gavin,

you said that, such links, inside labels are being maintained. But the question is, where are you putting those links normally (failing) ? Under some activity, resource of type XXX, in the topic text...?

It seems that we aren't decoding some part of the contents and we need to know what place is it.

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: broken links after restore: $@FORUMVIEWBYID*2571@$

by Gavin Stokes -
Kia ora Eloy,

All links are from topic areas in the course, not embedded within any activities or resources. They are all 'Link to file or web site' resources.

Links to files in another course work OK, but links to forums and directories in other courses do not.

I downloaded the backup file, unzipped and opened the moodle.xml file. The $@____VIEWBYID@$ strings are in there, so I'm guessing that the problem is on backup not restore?

thanks
Gavin

smile
In reply to Gavin Stokes

Re: broken links after restore: $@FORUMVIEWBYID*2571@$

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Gavin,

I think I've found (and solved) it. The problem was at restore time where we weren't trying to recode the reference field back to its correct form. Only the summary and text fields were covered.

I've changed it in CVS (1.5.3+ and 1.6dev) so changes will be available in the next daily update (also I've sent you privately -email- one copy of the modified file).

Feedback will be welcome! Thanks!

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: broken links after restore: $@FORUMVIEWBYID*2571@$

by Gavin Stokes -
Hi Eloy,

That did the trick!
Thankyou very much!!!!!!
smile smile

Gavin