Forums | Mahara Community

Support /
No 'filetype' in ArtefactTypeBlogPost


Howard Miller's profile picture
Posts: 191

28 August 2014, 21:30

Firstly, thanks very much for going to so much trouble. It is appreciated.

Your script didn't quite work for me. I just got an error (something like) 'View doesn't exist'. So, I modified it slightly to put try....catch around the get_artefact_instance(). So, the basic output is like this...

[INF] d2 (admin/cli/check_for_mismatched_block_artefacts.php:21) get the installed artefact types
[INF] d2 (admin/cli/check_for_mismatched_block_artefacts.php:25) get all the blocks that have an artefactid set
[INF] d2 (admin/cli/check_for_mismatched_block_artefacts.php:28) 68810 block(s) have an artefactid set
[INF] c0 (admin/cli/check_for_mismatched_block_artefacts.php:61) Number of get_artefact_instance failures = 581
[INF] c0 (admin/cli/check_for_mismatched_block_artefacts.php:63) 292 block / artefact clashes

(You will notice that I added a count for the number of times that get_artefact_instance() failed.

When get_artefact_instance fails, I get the following exception (usually, not everytime)...

[INF] c0 (admin/cli/check_for_mismatched_block_artefacts.php:56) Block instance: 90285 is a(n) internalmedia block but has an artefactid: 150229 that is type blogpost and therefore not allowed here

or...

[INF] c0 (admin/cli/check_for_mismatched_block_artefacts.php:56) Block instance: 45422 is a(n) textbox block but has an artefactid: 129182 that is type blog and therefore not allowed here

Hmmmm......

 

Howard Miller's profile picture
Posts: 191

01 September 2014, 21:32

Sorry to "bump", but I wonder if you have any more thoughts on this?

I'm a bit stuck 

Robert Lyon's profile picture
Posts: 773

02 September 2014, 14:30

Hi Howard,

Sorry, I've been a bit busy - will try to get to the bottom of this tomorrow

I ran my script over a site containing 2.5 million artefacts and got about a dozen internalmedia -> blogpost mismatches so I too want to know what's going on and how to fix it :)

 

Howard Miller's profile picture
Posts: 191

02 September 2014, 21:20

Interesting to hear it's not just me. No worries - much appreciate any help you can give.

Robert Lyon's profile picture
Posts: 773

03 September 2014, 9:03

Well so far I can see the problem but I can't yet see why the problem occurred - so I've created 2 bug reports relating to the data that I got from running my script on a db with 3/4 million block instances

https://bugs.launchpad.net/mahara/+bug/1364609

https://bugs.launchpad.net/mahara/+bug/1364615

Hopefully this will get fixed soon

Cheers

Robert

 

15 results