[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
SIMPLECommunity.org • View topic - Problem with Add Document page

Problem with Add Document page

Any technical questions (installation, configuration etc) should be posted here!

Problem with Add Document page

Postby Ian55 on Fri Feb 06, 2009 11:47 am

We are experiencing a problem when we try to add documents in the student role. When I click on a folder name then click "Add Document" there is a report of a Javascript error. I've had a look and the error message is "Error: 'tinyMCE' is undefined" with a line number of 395 given. It is possible to upload the document but the browser screen is subsequently blank with the address "http://[server name]/index.php" displayed and the message "Internet Explorer cannot display the webpage". I tried the same operation using Firefox and it works without any problems, returning to the upload folder after the file has successfully uploaded and displaying the proper screen.

I'd be grateful for any advice.
Ian55
Active
 
Posts: 12
Joined: Tue Oct 21, 2008 3:06 pm

Re: Problem with Add Document page

Postby mhughes2k on Mon Feb 09, 2009 4:10 am

Hope this helps.

M!

Application Developer, LTDU
SIMPLE Project Core Team
(w) http://personal.strath.ac.uk/michaelhughes/
(e) michaelhughes@strath.ac.uk
(twitter): http://twitter.com/mhughes2k
mhughes2k
SIMPLE Core Team
 
Posts: 130
Joined: Tue Jul 01, 2008 12:05 pm
Location: Glasgow

Re: Problem with Add Document page

Postby Ian55 on Tue Feb 10, 2009 6:26 am

Yes thanks, that solved the problem. There was another Javascript error appearing "line 377 character 4 document.editform.filename.value is null or not an object". I think this is thrown by the validateForm() function which tries to check that a file has been selected for upload. It looks like it's trying to check "filename" rather than "uploadDocument". Is it OK just to change the code in this function to refer to "document.editform.uploadDocument"? This works for the file upload feature as long as it doesn't interfere with any other functionality in the page.
Ian55
Active
 
Posts: 12
Joined: Tue Oct 21, 2008 3:06 pm

Re: Problem with Add Document page

Postby mhughes2k on Wed Feb 11, 2009 4:01 am

Absolutely feel free to change the code to fix anything that appears to be wrong.

If you do, it would be nice if you would post the updated file, and we'll incorporate the fix in to the main code base.

We're hoping to make the ability for technical people to commit changes to the Community Edition repository in the future via Subversion.


Michael
Hope this helps.

M!

Application Developer, LTDU
SIMPLE Project Core Team
(w) http://personal.strath.ac.uk/michaelhughes/
(e) michaelhughes@strath.ac.uk
(twitter): http://twitter.com/mhughes2k
mhughes2k
SIMPLE Core Team
 
Posts: 130
Joined: Tue Jul 01, 2008 12:05 pm
Location: Glasgow

Re: Problem with Add Document page

Postby Ian55 on Thu Feb 12, 2009 5:14 am

Sorry, there is another issue with this page. After amending the Javascript, there are no Javascript errors reported but I am still getting the blank page and "Internet Explorer cannot display the webpage" after clicking the Save button. Again, the document has actually been uploaded even though the browser does not return to the upload directory page. The address displayed by Internet Explorer on the blank page is "http://[server url]/index.php" whereas the address displayed by Firefox is "http://[server url]/index.php?option=office&folder=9" and the correct page is displayed.

If I use Firefox, everything works correctly. I had set up a test version of the SIMPLE software on a standalone PC so I tried to replicate the problem on it. The only difference between this version and the live server version is that the web server is Apache, not Internet Information server. On the standalone PC version it works correctly in both Internet Explorer and Firefox.
:?:
Ian55
Active
 
Posts: 12
Joined: Tue Oct 21, 2008 3:06 pm

Re: Problem with Add Document page

Postby mhughes2k on Wed Feb 18, 2009 10:07 am

Ian, I'll make a note of looking at this. It sounds like there may be something happening in the redirection phase after the file is uploaded. However it is something that is done quite a lot by SIMPLE so i'm curious as to why it seems to only affect that page...

Michael
Hope this helps.

M!

Application Developer, LTDU
SIMPLE Project Core Team
(w) http://personal.strath.ac.uk/michaelhughes/
(e) michaelhughes@strath.ac.uk
(twitter): http://twitter.com/mhughes2k
mhughes2k
SIMPLE Core Team
 
Posts: 130
Joined: Tue Jul 01, 2008 12:05 pm
Location: Glasgow

Re: Problem with Add Document page

Postby Ian55 on Mon Feb 23, 2009 6:13 am

I've come across the following information in relation to a problem with the REQUEST_URI variable which is used in the coreOffice.php module in relation to Internet Information Server 7 on the Microsoft site.

#####################################################################################################################################
This problem occurs because the FastCGI module in IIS 7.0 incorrectly sets the REQUEST_URI server variable. The FastCGI module does not preserve the query string when the REQUEST_URI server variable is used. For example, "index.php?id=12345" is a request Uniform Resource Identifier (URI). However, the $_SERVER ["REQUEST_URI"] variable returns "index.php."
#####################################################################################################################################

Again the odd thing is that Firefox does go to the correct page and no errors are displayed. I'll ask our IT people to look at this.
Ian55
Active
 
Posts: 12
Joined: Tue Oct 21, 2008 3:06 pm

Re: Problem with Add Document page

Postby Ian55 on Tue Feb 24, 2009 8:14 am

We've tried out the REQUEST_URI variable on the IIS server and it does work correctly so that isn't the problem after all. I downloaded the Google Chrome browser and it all works correctly in that and in Firefox so the issue must be something to do with Internet Explorer 7. I've tried adjusting various security settings in Internet Explorer but it didn't make any difference. We are still getting the same error. The odd thing is that the URL which appears in the browser address bar is just the index.php address without any parameters so I would expect the browser to just go to the SIMPLE start page rather than reporting an error. I'm really stumped on this one. :roll:
Ian55
Active
 
Posts: 12
Joined: Tue Oct 21, 2008 3:06 pm

Re: Problem with Add Document page

Postby Ian55 on Wed Mar 04, 2009 4:54 am

I've looked at the http header information being sent to the browser by Internet Information Server 6. This is what is being sent after the file is selected for upload. I've copied the information below.
==================================================================================================================================

POST /index.php HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application,

application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, application/x-shockwave-flash, */*
Referer: http://[server name]/index.php?option=office&cmd=addfile&destfolderid=41
Accept-Language: en-gb
Content-Type: multipart/form-data; boundary=---------------------------7d9ea830858
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; QS 4.2.2.3; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; InfoPath.2; .NET CLR

3.0.04506.648; MS-RTC LM 8; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: [server name]
Content-Length: 78819
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: PHPSESSID=5b3i5rtlm9ibp157dtjac7mjg6

-----------------------------7d9ea830858
Content-Disposition: form-data; name="option"

office
-----------------------------7d9ea830858
Content-Disposition: form-data; name="cmd"

uploaddocument
-----------------------------7d9ea830858
Content-Disposition: form-data; name="redir"

JavaScript:history.go(-1);
-----------------------------7d9ea830858
Content-Disposition: form-data; name="destfolderid"

41
-----------------------------7d9ea830858
Content-Disposition: form-data; name="docuid"


-----------------------------7d9ea830858
Content-Disposition: form-data; name="contenttype"


-----------------------------7d9ea830858
Content-Disposition: form-data; name="uploadDocument"; filename="C:\Documents and Settings\mlif1\My Documents\Blackboard eLP Organisation Request form.doc"
Content-Type: application/msword

ÐÏࡱá

HTTP/1.1 302 Moved Temporarily
Connection: close
Date: Wed, 04 Mar 2009 09:56:08 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-Powered-By: PHP/5.2.8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: cache, must-revalidate
Pragma: public
Location: http://[server name]/index.php?option=office&folder=41
Content-type: text/html
====================================================================================================================

In Internet Explorer the browser now displays an error page with "http://[server name]/index.php" in the address bar. In Firefox and Google Chrome the process continues successfully. I noticed the odd characters which precede the "HTTP/1.1 302 Moved Temporarily" header, ÐÏࡱá. These also appear in the Firefox http headers. I wondered whether Internet Explorer is failing at this point while Firefox just ignores the error and carries on?
Ian55
Active
 
Posts: 12
Joined: Tue Oct 21, 2008 3:06 pm

Re: Problem with Add Document page

Postby Ian55 on Mon Mar 09, 2009 8:56 am

I've found a possible solution to this problem as long as it doesn't have any problematic side effects. In coreOffice.php I replaced the header("Location:index.php... with header("Refresh: 0; URL= index.php...

This does now work and displays the directory page where you uploaded the file. From what I've picked up browsing the web, it sounds like this is a problem with IIS and PHP. Apache doesn't exhibit this problem.
Ian55
Active
 
Posts: 12
Joined: Tue Oct 21, 2008 3:06 pm

Next

Return to Technical

Who is online

Users browsing this forum: No registered users and 4 guests

cron