File Resources post an error but work...

File Resources post an error but work...

by Josh Jones -
Number of replies: 12

Warning: urldecode() expects parameter 1 to be string, object given in C:\phsonline\course\lib.php on line 646

I get this error message when I put a pdf, ppt, swf, or some other file resource.  The resources work correctly, however, this error displays right above the resource link for each resource in the topics section.

Josh Jones

Attachment screen.JPG
Average of ratings: -
In reply to Josh Jones

Re: File Resources post an error but work...

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm not seeing this ... what version are you using?  Good candidate for the bug tracker ...
In reply to Martin Dougiamas

Re: File Resources post an error but work...

by Josh Jones -

This is version 1.3.1 running on a windows machine with MySQL backend.

I just installed about a month ago for the first time and it was working great, then I got this error message only when I upload a file.  uploads work everywhere else in other modules.  I can also post a resource with just txt or html and it works fine.

Perhaps I should upgrade to 1.3.3 or 1.4?  which one would you suggest?  is 1.4 nearly ready to go or is there a lot to be finished?

thanks

Josh

In reply to Josh Jones

Re: File Resources post an error but work...

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
My only guess is the scripts have changed on your server ... the code just simply shouldn't be doing what that message says it is doing... try upgrading to 1.3.3
In reply to Martin Dougiamas

Re: File Resources post an error but work...

by Josh Jones -

Warning: urldecode() expects parameter 1 to be string, object given in C:\phsonline\course\lib.php on line 931

This is the new error I get directly above my resources.  Again, they all work and I can open pdf files and such, but this is annoying as you can see from my picture on my initial post.  Every resource shows this.

I just upgraded to 1.3.3+ and it is still coming up with this message.

Any suggestions?

In reply to Martin Dougiamas

Re: File Resources post an error but work...

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
I had this happen to me on one of my dev sites. It was (is) happening to labels and had to do with the 'extras' property of the mod. It was using an 'urldecode' on the 'extra' property, but for some reason, the 'extra' property was an object containing an 'extra' string property. I haven't yet figured out what has changed to cause this.

My version is 1.3.3 (2004052503).

mike
In reply to Mike Churchward

Re: File Resources post an error but work...

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
I still haven't figured out what was happening, but when I edited the label and saved it (no changes made), the problem went away...

mike
In reply to Mike Churchward

Re: File Resources post an error but work...

by Josh Jones -

I will try to edit them and see if that fixes it... are you opening the resources in a popup window or something?  or is that option unchecked?

Josh

In reply to Josh Jones

Re: File Resources post an error but work...

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Never had the problem with resources - just with labels.

Weird.
In reply to Mike Churchward

Re: File Resources post an error but work...

by Josh Jones -

I just went ahead and edited them and they started working...  Like  you said with your labels, I did nothing but edit and save and exit and they started to show correctly.

This is working with 1.3.3+, thanks for the suggestions

Josh

In reply to Josh Jones

Re: File Resources post an error but work...

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
OK, I'm thinking that the course->modinfo field had somehow got a bit out of date. Editing any activity refreshes this cache data, which would be fixing the problem.

Can you guys tell me which version you had upgraded from before you saw the problem? We may just need to rebuild the course caches during that particular upgrade.
In reply to Martin Dougiamas

Re: File Resources post an error but work...

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
In my case, it was a fresh install from CVS of MOODLE_13_STABLE. No update. While trying to debug what was going on the problem fixed itself.

I was customizing this particular installation. I did add some tables to the database, and changed some code - I figured my code had buggered something - but nothing else. Then when I edited the labels, the problem went away.

mike
In reply to Martin Dougiamas

Re: File Resources post an error but work...

by Josh Jones -

I had 1.3.1 and upgraded to 1.3.3+

Problem was fixed in 1.3.3+ with a refresh.

Josh