Forums | Mahara Community

Developers /
An exception was thrown of class InvalidArgumentException


Dirk Meyer's profile picture
Posts: 425

15 February 2013, 2:07 PM

A user was updating a page and now the following error message occurs. I am not sure how to recover from this and any help or pointers is appreciated. (I changed the name of site and IP)

Mahara: Site unavailable

A nonrecoverable error occurred. This probably means you have encountered a bug in the system

The error log below refers to page id=1158 whis seems to be working fine. The page throwing the error has an id=1159

 

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] [WAR] 9d (lib/errors.php:464) An exception was thrown of class InvalidArgumentException. , referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] [WAR] 9d (lib/errors.php:464) THIS IS BAD and should be changed to something extending MaharaException,, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] [WAR] 9d (lib/errors.php:464) unless the exception is from a third party library., referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] [WAR] 9d (lib/errors.php:464) Original trace follows, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] [WAR] 9d (artefact/lib.php:343) Field size wasn't found in class ArtefactTypeBlogPost, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] Call stack (most recent first):, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] * ArtefactType->get("size") at /var/www/website/artefact/file/blocktype/filedownload/lib.php:65, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] * PluginBlocktypeFiledownload::render_instance(object(BlockInstance)) at Unknown:0, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] * call_user_func_array(array(size 2), array(size 1)) at /var/www/website/lib/mahara.php:1359, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] * call_static_method("PluginBlocktypeFiledownload", "render_instance", object(BlockInstance)) at /var/www/website/blocktype/lib.php:720, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] * BlockInstance->render_viewing() at /var/www/website/lib/view.php:1555, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] * View->build_column(2, false) at /var/www/website/lib/view.php:1523, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] * View->build_columns() at /var/www/website/view/view.php:322, referer: http://www.website.com/view/view.php?id=1158

[Thu Feb 14 17:59:22 2013] [error] [client xx.xx.xxx.xx] , referer: http://www.website.com/view/view.php?id=1158

anonymous profile picture
Deleted user
Posts: 197

21 February 2013, 11:52 AM

Hi Dirk,

On that page, 1158, is there a file download block and/or a journal block visible? If so, which? The error message suggests to me that something is trying to treat a blog post block as though it were a file download block, or vice versa.

Thanks,
Melissa

Dirk Meyer's profile picture
Posts: 425

21 February 2013, 12:57 PM

Hi Melissa,

yes, 1158 has a recent journal entry block yet the user does not have a journal setup.  Under /artefact/blog/view/ there is no journal yet three journals are available to choose from on the page level and when chosen, they have what appears to be complete content. Could it be the user deleted the journals?

It behaves similar related to an earlier (fixed bug) https://bugs.launchpad.net/mahara/+bug/813204 and discussion here https://mahara.org/interaction/forum/topic.php?id=3866&offset=0

Thnaks,

Dirk

anonymous profile picture
Deleted user
Posts: 197

21 February 2013, 1:37 PM

Let me see if I can reproduce that ...

Dirk Meyer's profile picture
Posts: 425

21 February 2013, 1:55 PM

correction;

at artefact/blog/ the journals are there

anonymous profile picture
Deleted user
Posts: 197

21 February 2013, 1:56 PM

And are the journals present the exact ones expected in the block?

anonymous profile picture
Deleted user
Posts: 197

21 February 2013, 1:58 PM

 Well i just tested and it's fine if the journal gets deleted, it just shows an empty block.

Dirk Meyer's profile picture
Posts: 425

21 February 2013, 2:04 PM

Thanks.

How can I tell what's supposed to be in 1159?

anonymous profile picture
Deleted user
Posts: 197

21 February 2013, 2:31 PM

In your database, the follow query will give us starting points to see what is supposed to be shown on the page:

select * from block_instance where view = 1159;
Dirk Meyer's profile picture
Posts: 425

01 March 2013, 5:14 PM

Thanks for your help, Melissa. This is now resolved...sort of.

During investigating, I rememberred that this account had been imported via LEAP. From backups of the original system and the new system going back almost a year, we could see that the original page did have additional artefacts that did not come accross during the export. I ran the export/import procedure with the entire account and just the page in question several times and no errors were seen, at least not in the apache log,  during export and the file appeared to import properly . The user had about 30 pages in two collections so an immediate check was not done when it was imported originally.

The query revealed that the page on the new system has a textbox, gallery, image, contact info and filedownload. A pdf and wmv that were present on the original page did not come across to the imported page, seemingly for no apparent reaon. No data was lost and all is well. It bugs me a little bit that something from a long time ago did not get discovered until now which makes it difficult to troubleshout.

Thanks again.

12 results