Forums | Mahara Community

Support /
Error"Reload the page to log in" is shown when try to insert any items to the page in Mahara 17.10.x version using IE 11 under Window 10 Enterprise (64 bit)


william chan's profile picture
Posts: 38

15 May 2018, 23:31

Dear ,

We upgraded Mahara to 17.10.x version and PHP is also upgrade to 7.0.x

 

When I try to IE 11 browser under window 10 Enterprise (64 bits) OS to edit the page by adding some items e.g. Text block to the page (please see the following screenshot). 

IE version

IE 11
11.431.16299
11.0.65

 

Error "Reload the page to log in" is shown and cannot insert the image block to the page.

While I do the same tasks using Google chrome or Firefox under OS, it is okay and no problem is found.

It seem it is relevant to IE 11 under Window 10 OS .

Then I try to another PC which installed with IE 11 under Window 7 (64 bit). It is also okay and can add the image block to the page.

 

In apache error log, it show below error

[Tue May 15 19:00:41.214535 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] [WAR] 19 (artefact/outcome/lib.php:269) Declaration of ArtefactTypeViewoutcome::render_self() should be compatible with ArtefactType::render_self($options), referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214604 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] Call stack (most recent first):, referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214618 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] * log_message(string(size 115), integer, true, true, string(size 42), integer) at /local/www/mahara/lib/errors.php:521, referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214629 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] * error(integer, string(size 115), string(size 42), integer, array(size 9)) at /local/www/mahara/lib/mahara.php:1601, referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214640 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] * require_once() at /local/www/mahara/lib/mahara.php:1601, referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214650 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] * safe_require(string(size 8), string(size 7), string(size 7), string(size 12), false, null) at /local/www/mahara/lib/mahara.php:1633, referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214661 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] * safe_require_plugin(string(size 8), string(size 7)) at /local/www/mahara/lib/web.php:3248, referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214671 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] * right_nav() at /local/www/mahara/lib/web.php:703, referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214681 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] * smarty() at /local/www/mahara/artefact/file/blocktype/pdf/viewer.php:50, referer: https://abc.com/view/blocks.php?id=354
[Tue May 15 19:00:41.214691 2018] [:error] [pid 18689:tid 140066072508160] [client 175.159.60.92:50752] , referer: https://abc.com/view/blocks.php?i

 

Please advise how to solve it.

                        William

 

The screenshot for the error

window-10-64bit-error.png

Robert Lyon's profile picture
Posts: 757

16 May 2018, 8:30

Hi William,

I believe the problem you are getting relates to this line of the error report

 ArtefactTypeViewoutcome::render_self() should be compatible with ArtefactType::render_self($options)

In PHP 7+ a method in a child class needs to have at least the same parameters as the parent method.

So the Artefact plugin Viewoutcome render_self() function needs to have the $options parameter

As the Viewoutcome plugin is not part of core you can try and fix up yourself.

See https://reviews.mahara.org/#/c/6408/ for changes done to various artefact / blocktype plugins to make them PHP 7 compatible

Cheers

Robert

 

william chan's profile picture
Posts: 38

16 May 2018, 14:35

Dear Robert,

 

Thank for your reply.

I remove "outcome" plugin from the system.

Still have same problem.

 

I further investigate it. I find the root cause is that the uploaded pdf cannot be shown properly using IE 11 with Window 10 in our office environment. ("Invalid or corrupted PDF file). Then after I try to insert image block to the page. The error is shown and cannot add any block.

While I use my home PC or notebook with same window OS  to test it . The PDF can be shown properly and I can insert any block to the page.

There is no problem if using Google or Firefox browser.

 

Any Hint?

Regards,

                  William

 

william chan's profile picture
Posts: 38

16 May 2018, 15:05

Dear Robert,

 

After click on "more information with PDF block

it show "PDF.js v1.4.20(build:b15f335) Message: Invalid PDF structure".

 

Regards,

                   William

william chan's profile picture
Posts: 38

16 May 2018, 18:14

Dear ,

I also enable IE 11 debugger in Window 10 OS  and find the following error during open this page

 

Error: Invalid XRef stream header
   at error (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:3:14995)
   at XRef_readXRef (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:12:23132)
   at XRef_parse (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:12:15761)
   at PDFDocument_setup (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:22:25680)
   at PDFDocument_parse (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:22:23621)
   at Anonymous function (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:22:30210)
   at Promise (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:4:2328)
   at LocalPdfManager_ensure (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:22:30101)
   at BasePdfManager_ensureDoc (https://maharadev.ln.edu.hk//artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js:22:28387)
Warning: Indexing all PDF objects
#loading_error is undefined.
#invalid_file_error is undefined.
#error_version_info is undefined.
#error_message is undefined.
Warning: Unhandled rejection: Error: Invalid or corrupted PDF file.
Error: Invalid or corrupted PDF file.
   at getDocumentError (https://maharadev.ln.edu.hk/artefact/file/blocktype/pdf/js/pdfjs/web/viewer.js:6549:9)
   at runHandlers (https://maharadev.ln.edu.hk/artefact/file/blocktype/pdf/js/pdfjs/build/pdf.min.js:1:23111)

 

 

Regards,

                      William

17 May 2018, 12:28

===================
Manual Test Script
===================

Environment tested:

  1. Windows 10 Vitrualbox
  2. Sauce labs Windows 10 IE 11

Browser tested:

  1. Chrome
  2. IE 11
  3. Microsoft Edge

URL: https://demo.mahara.org 18.04
URL: local install - 17.10 & 18.04

Test Steps

1. log in as Admin / staff / student
2. Browse to the Upload files page - ensure you have uploaded a PDF file
3. create a portfolio page (PDF test)
4. add a PDF block to the page
5. Select the pdf file you uploaded in the previous step
6. Save
7. Display the page
8. Confirmed that user can see the PDF and there was no error messages displayed ✔

Catalyst QA - No issues found

I am unable to reproduce the bug following the above test steps. Would it be possible for you to try using the Demo Mahara site https://demo.mahara.org or trying a different PDF file.

william chan's profile picture
Posts: 38

18 May 2018, 5:25

Dear ,

After further investigation, we find the root cause is that

In our office environment, All Office PC are added to the window Domain and customized group policy is enforced in all office PC.

For the IE security setting in Group policy, we add only some sites are trusted.

we find there is cross domain issue when loading PDF.js to load the pdf file from mahara page.

When we set IE security setting from group policy to trust all site.

 

PDF  file can be loaded correctly in IE 11 under Window 10 in our office.

I think there is some external site to call in PDF.js.

Becuse of cross domain and non-trusted site , the PDF.js cannot be loaded successfully.

 

Please advise how to do it.

 

Solution Option 1) modifiy the pdf lib files in Mahara to not load external site.

Solution Option 2) add external site loaded from PDF.js to the trustful site list via group policy.

 

Please advise.

                          William

 

7 results