Moodle

wiki [[uplrejsect]] error - not consistant

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.6, 1.7, 1.8, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
  • Fix Version/s: None
  • Component/s: Wiki (1.x)
  • Labels:
    None
  • Environment:
    All
  • Database:
    Any
  • Affected Branches:
    MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

Description

This issue was reported on Moodle forums twice but never got any attention, see:

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

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

I'm also attaching a screenshot for this error message. Basically, it's not consistent. When you enable binary file upload in eWiki, and upload a picture file in the Attachments tab, sometimes it uploaded correctly, sometime you just got this [[uplrejsect]] error message and saying that No files uploaded yet. It does not matter with your image file size. I think this is a big bug so if this could be fixed ASAP that would be really cool. thanks!

Activity

Hide
Martin Dougiamas added a comment -

From Petr Skoda (skodak at centrum.cz) Friday, 21 July 2006, 09:25 PM:

What does it mean sometimes? Does it depend on file name?

Only ASCII characters are supported, we are not planning any non-security fixes for the old wiki - waiting for the new one

From Wen Hao Chuang (wh_chuang at yahoo.com) Saturday, 5 August 2006, 07:00 AM:

I don't think it's related to the filename. It just happened from time to time..

Show
Martin Dougiamas added a comment - From Petr Skoda (skodak at centrum.cz) Friday, 21 July 2006, 09:25 PM: What does it mean sometimes? Does it depend on file name? Only ASCII characters are supported, we are not planning any non-security fixes for the old wiki - waiting for the new one From Wen Hao Chuang (wh_chuang at yahoo.com) Saturday, 5 August 2006, 07:00 AM: I don't think it's related to the filename. It just happened from time to time..
Hide
Elena Ivanova added a comment -

We have got report of the same problem for Moodle 1.6.3 + (2006050531). Was not able to replicate yet.

Show
Elena Ivanova added a comment - We have got report of the same problem for Moodle 1.6.3 + (2006050531). Was not able to replicate yet.
Hide
Howard Miller added a comment -

Just to add my $0.02 - we get it too on our 1.5.4 site. It seems to apply only to certain wikis, but happens every time. I have only tried it with (small) jpeg files.

Show
Howard Miller added a comment - Just to add my $0.02 - we get it too on our 1.5.4 site. It seems to apply only to certain wikis, but happens every time. I have only tried it with (small) jpeg files.
Hide
Peter Ruthven-Stuart added a comment -

Since updating my Moodle via CVS on the 24 Sept, I and students have also been unable to upload files to Wikis - the default Wiki module. The error message appearing in the the Attachments page is: [[uplrejsect]]. I have also reported this issue in the forums:

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

I do hope this can be fixed as soon as possible, since it means that the Wiki module is now severely limited. Thank you.

Show
Peter Ruthven-Stuart added a comment - Since updating my Moodle via CVS on the 24 Sept, I and students have also been unable to upload files to Wikis - the default Wiki module. The error message appearing in the the Attachments page is: [[uplrejsect]]. I have also reported this issue in the forums: http://moodle.org/mod/forum/discuss.php?d=81294 I do hope this can be fixed as soon as possible, since it means that the Wiki module is now severely limited. Thank you.
Hide
Rahim Virani added a comment -

We have also experienced this issue, in fact after recieving a 'blank' screen after uploading a file, that same day I was able to upload the same file with no problems. (Moodle 1.8.3 browser: FF2.0.12/Windows XP)

Show
Rahim Virani added a comment - We have also experienced this issue, in fact after recieving a 'blank' screen after uploading a file, that same day I was able to upload the same file with no problems. (Moodle 1.8.3 browser: FF2.0.12/Windows XP)
Hide
Frédéric Hoogstoel added a comment -

I have the same error with moodle 1.8.2 on PHP5, Debian
The error appears with a lot of file types, names and sizes.

Show
Frédéric Hoogstoel added a comment - I have the same error with moodle 1.8.2 on PHP5, Debian The error appears with a lot of file types, names and sizes.
Hide
Howard Miller added a comment -

We also have it on 1.9.3... we tried with .wav files.

Interestingly the upload on the edit page doesn't work (This format is unacceptable) either - I assume it's just meant for images but it would be nice if it said so.

When using attachments we get the [[uplrejsect]] thing. I assume it's meant to be an instance of this (internal) message -

"UPL_REJSECT"] = 'The given download section "$sect" has been rejected. Please only use the default ones, or tell the WikiAdmin to reenable per-page uploads; else others can\'t find your uploaded files easily."

....doesn't really help much either. Anyway it's all a big hassle

Show
Howard Miller added a comment - We also have it on 1.9.3... we tried with .wav files. Interestingly the upload on the edit page doesn't work (This format is unacceptable) either - I assume it's just meant for images but it would be nice if it said so. When using attachments we get the [[uplrejsect]] thing. I assume it's meant to be an instance of this (internal) message - "UPL_REJSECT"] = 'The given download section "$sect" has been rejected. Please only use the default ones, or tell the WikiAdmin to reenable per-page uploads; else others can\'t find your uploaded files easily." ....doesn't really help much either. Anyway it's all a big hassle
Hide
Jan B added a comment -

Hi,

is there any solution to this problem? We still have this problem, but the problem does not occur everytime. Sometimes I got this uplrejsect-message and perhaps one hour later it works

Thanks, JB

Show
Jan B added a comment - Hi, is there any solution to this problem? We still have this problem, but the problem does not occur everytime. Sometimes I got this uplrejsect-message and perhaps one hour later it works Thanks, JB
Hide
Tatsuya Shirai added a comment -

You can get this error message easily and every time.
On editing new page (you hadn't updated the page yet), you try to upload a file as attachment.

---- add to lang file 'wiki.php'---
$string['uplrejsect'] = 'The given download section $a[sect] has been rejected. Please only use the default ones, or tell the WikiAdmin to reenable per-page uploads; else others can\'t find your uploaded files easily.';


Show
Tatsuya Shirai added a comment - You can get this error message easily and every time. On editing new page (you hadn't updated the page yet), you try to upload a file as attachment. ---- add to lang file 'wiki.php'--- $string['uplrejsect'] = 'The given download section $a[sect] has been rejected. Please only use the default ones, or tell the WikiAdmin to reenable per-page uploads; else others can\'t find your uploaded files easily.';
Hide
Wen Hao Chuang added a comment -

I'm changing the affected versions as this is still a problem with the latest 1.9.x codes. Ludo do you have time to work on this? Many thanks!

Show
Wen Hao Chuang added a comment - I'm changing the affected versions as this is still a problem with the latest 1.9.x codes. Ludo do you have time to work on this? Many thanks!
Hide
Dennis Meyer added a comment -

@Wen Hao Chuang: do you work with groups on those wikis?

Show
Dennis Meyer added a comment - @Wen Hao Chuang: do you work with groups on those wikis?
Hide
Wen Hao Chuang added a comment -

@Dennis no I don't work with groups on those wikis.

Show
Wen Hao Chuang added a comment - @Dennis no I don't work with groups on those wikis.
Hide
Tatsuya Shirai added a comment -

Hi, Wen Hao Chuang,.

I think that this issue is not a bug, it's specification of eWiki. (It's not a joke).

But, it is a bug that the error message is not displayed correctly like as "[[uplrejsect]]".

Show
Tatsuya Shirai added a comment - Hi, Wen Hao Chuang,. I think that this issue is not a bug, it's specification of eWiki. (It's not a joke). But, it is a bug that the error message is not displayed correctly like as "[[uplrejsect]]".
Hide
Donna Hrynkiw added a comment -

We are experiencing this problem under v1.9.5.

Scenario: Student attempts to add an attachment to a brand-new, empty page and receives the "[[uplrejsect]]" error.

Workaround: Have student add a little text to the page and save it. Then they are able to successfully add an attachment.

Donna Hrynkiw
Kwantlen Polytechnic University

Show
Donna Hrynkiw added a comment - We are experiencing this problem under v1.9.5. Scenario: Student attempts to add an attachment to a brand-new, empty page and receives the "[[uplrejsect]]" error. Workaround: Have student add a little text to the page and save it. Then they are able to successfully add an attachment. Donna Hrynkiw Kwantlen Polytechnic University
Hide
Pablo Cecere added a comment -

Tatsuya Shirai is partially right. Adding the string in the lang/en_utf8/wiki.php (or replacing en_utf8 by the language you are using in your moodle), displays the error instead of [[uplrejsect]].
But there is something else. In mod/wiki/ewiki/plugins/moodle/downloads.php (around line 43) you will find these lines, that mean that you can only upload attachments to the main section, and not in any other:

$ewiki_upload_sections = array(
"" => "main",

  1. "section2" => "section2",
    );

And you're getting this error:
The given download section “WIKI SECTION NAME HERE” has been rejected. Please only use the default ones, or tell the WikiAdmin to reenable per-page uploads; else others can't find your uploaded files easily.
When you access the Wiki attachments page, the dropdown shows main –in $ewiki_upload_sections, as shown above-, and the current wiki section by adding the value in $def_sec.
What I did is adding this change in mod/wiki/ewiki/plugins/downloads.php (line 160) to allow to add in the main section or the current wiki section, since that option is available in the attachments page. This is the change:

//added by pcecere ------
if ($def_sec == $_REQUEST["section"]) { $meta["section"] = $sect; } else {
//added by pcecere ------

if ($ewiki_upload_sections[$sect]

($action==EWIKI_ACTION_ATTACHMENTS) && ($data["content"])
&& strlen($ewiki_plugins["action"][EWIKI_ACTION_ATTACHMENTS])) { $meta["section"] = $sect; }
else { $o .= ewiki_t("UPL_REJSECT", array('sect' => $sect)); return($o); } //added by pcecere ------

This will fix everything.
Pablo

Show
Pablo Cecere added a comment - Tatsuya Shirai is partially right. Adding the string in the lang/en_utf8/wiki.php (or replacing en_utf8 by the language you are using in your moodle), displays the error instead of [[uplrejsect]]. But there is something else. In mod/wiki/ewiki/plugins/moodle/downloads.php (around line 43) you will find these lines, that mean that you can only upload attachments to the main section, and not in any other: $ewiki_upload_sections = array( "" => "main",
  1. "section2" => "section2", );
And you're getting this error: The given download section “WIKI SECTION NAME HERE” has been rejected. Please only use the default ones, or tell the WikiAdmin to reenable per-page uploads; else others can't find your uploaded files easily. When you access the Wiki attachments page, the dropdown shows main –in $ewiki_upload_sections, as shown above-, and the current wiki section by adding the value in $def_sec. What I did is adding this change in mod/wiki/ewiki/plugins/downloads.php (line 160) to allow to add in the main section or the current wiki section, since that option is available in the attachments page. This is the change: //added by pcecere ------ if ($def_sec == $_REQUEST["section"]) { $meta["section"] = $sect; } else { //added by pcecere ------ if ($ewiki_upload_sections[$sect]
($action==EWIKI_ACTION_ATTACHMENTS) && ($data["content"]) && strlen($ewiki_plugins["action"][EWIKI_ACTION_ATTACHMENTS])) { $meta["section"] = $sect; } else { $o .= ewiki_t("UPL_REJSECT", array('sect' => $sect)); return($o); } //added by pcecere ------
This will fix everything. Pablo
Hide
Pablo Cecere added a comment -

copying the change again ... since it doesnt loook good.

//added by pcecere ------
if ($def_sec == $_REQUEST["section"]) { $meta["section"] = $sect; } else {
//added by pcecere ------

if ($ewiki_upload_sections[$sect]
//next line I separated the OR so it doesnt make a box ... put it together again...

  ($action==EWIKI_ACTION_ATTACHMENTS) && ($data["content"])
&& strlen($ewiki_plugins["action"][EWIKI_ACTION_ATTACHMENTS])) { $meta["section"] = $sect; }
else { $o .= ewiki_t("UPL_REJSECT", array('sect' => $sect)); return($o); } //added by pcecere ------
Show
Pablo Cecere added a comment - copying the change again ... since it doesnt loook good. //added by pcecere ------ if ($def_sec == $_REQUEST["section"]) { $meta["section"] = $sect; } else { //added by pcecere ------ if ($ewiki_upload_sections[$sect] //next line I separated the OR so it doesnt make a box ... put it together again...
  ($action==EWIKI_ACTION_ATTACHMENTS) && ($data["content"]) && strlen($ewiki_plugins["action"][EWIKI_ACTION_ATTACHMENTS])) { $meta["section"] = $sect; } else { $o .= ewiki_t("UPL_REJSECT", array('sect' => $sect)); return($o); } //added by pcecere ------
Hide
Pablo Cecere added a comment -

didnt work ... that part of the code inside the box has to remain the same ...
if you have any issues understanding, contact me.

Show
Pablo Cecere added a comment - didnt work ... that part of the code inside the box has to remain the same ... if you have any issues understanding, contact me.

Dates

  • Created:
    Updated: