Forums | Mahara Community

Support /
unusual page behaviour


17 February 2018, 1:32

hi

i have a student who is getting this message when she tried to edit a page:

eportfolio query.png

 

She has tried removing text boxes and choosing different layouts but can't seem to get it to play nicely. Any ideas?

Robert Lyon's profile picture
Posts: 756

22 February 2018, 9:55

Hi Teresa,

The problem your student is having is there is a problem with the sort order of the blocks for this page.

Normally blocks in a cell on a page are ordered from 1 upwards, eg 1, 2, 3 ... and no two block can occupy the same row/column/order value.

Part of the code used when moving a block on a page checks if a block being moved will occupy the row/column/order of an existing block and if so moves it out of the way to order position 0 before repositioning it and all the blocks higher in order.

So once all done the order of the blocks still is 1, 2, 3 ...

For some reason on their page there is already a block in the order position of 0 so the moving of existing block out of the way fails.

To check what is going on in the database you can run the command

 SELECT bi.row, bi.column, bi.order FROM ep_block_instance bi WHERE bi.view = 134758 ORDER BY bi.row, bi.column, bi.order;

If any of the 'order' column values are '0' update them to be a number higher than the maximum order number

Cheers

Robert

22 February 2018, 21:55

Many thanks for your help Robert :)

3 results