Blocks disappear when moving from left to right.

Blocks disappear when moving from left to right.

- W Page の投稿
返信数: 13
Hello!

When I move a block from left to right the block I was trying to move disappears and therefore does not appear on the right.

What could be causing this??

WP1

W Page への返信

Re: Blocks disappear when moving from left to right.

- Gustav W Delius の投稿
Is the block, after it disappears, listed in the Blocks Add... drop-down list? For me blocks sometimes disappear like that when the arrow icon is just underneath the delete icon and I am a bit off with my mouse click.
Gustav W Delius への返信

Re: Blocks disappear when moving from left to right.

- W Page の投稿
Hi Gustav,

The "Drop Down" List Block is not on the page at all. It has been missing actually since the upgrade to v1.3. I am having other problems after the upgrade as well. See

"500" error after updating - may be Calendar Problem??
http://moodle.org/mod/forum/discuss.php?d=7683

and

Problems upgrading site - Please Please Help!!!!
http://moodle.org/mod/forum/discuss.php?d=7804

This may be connected to those problems.

I have been waiting for a response from the webhost, 1and1.com, about the 500 error. 
1 and 1 does not provide error logs so it is not possible to find oot on my own what is causing the 500 error.  I think I better not hold my breath on that response however.  sad

I would really like to know what is causing this upgrade problem.  Although it does not happen all the time, it happens enough to be a real bother.  Also, I am getting weary of having to have to delete the website and the database and then reinstall them in order to get rid of the problem.

WP1
W Page への返信

Re: Blocks disappear when moving from left to right.

- Martin Dougiamas の投稿
画像 Core developers 画像 Documentation writers 画像 Moodle HQ 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers
I'd also like to know what the cause is for this, W ... until I hear of any others with the same problem, though, my best guess is that it's something unusual on that 1and1 server (especially given earlier reports of wierd 500 errors at the same ISP).
W Page への返信

Re: Blocks disappear when moving from left to right.

- van herbruggen geert の投稿

Hello

I'm heaving the same problem. When I move a block from Right to Left it disappears.
It appears in the add blocks list (as it were deleted)

Geert

van herbruggen geert への返信

Re: Blocks disappear when moving from left to right.

- Gustav W Delius の投稿

Does this happen every time you move a block from left to right? Does it happen also when moving from right to left? Does it happen with all blocks?

Gustav W Delius への返信

Re: Blocks disappear when moving from left to right.

- van herbruggen geert の投稿

Hello

I just upgraded to the stable version of moodle 1.3

I can add 1 block, then it appears on the right side. When I move it to the left side, it disappears. Then, the name is still in the list, like I deleted the block.

I run EasyPHP on a windows machine. Has it got to do withe this maybe ?

Geert

van herbruggen geert への返信

Re: Blocks disappear when moving from left to right.

- Chad Parmentier の投稿
I know this forum is old, but I just installed the latest version of 1.9.3+ and cannot move blocks from right to left. They do not disappear from the drop down list the block just acts as though it was deleted.
Chad Parmentier への返信

Re: Blocks disappear when moving from left to right.

- Ann Adamcik の投稿
Do you have any pinned blocks (aka sticky blocks)? If so, they can sometimes cause other blocks to disappear when you try to move them. See MDL-11131.
Ann Adamcik への返信

Re: Blocks disappear when moving from left to right.

- Chad Parmentier の投稿
Thanks for the reply, I seemed to have fixed the blocks problem but I never was able to recover the resources block that appears on the front page. When I moved it right it disappeared. I think I read somewhere others having a similar issue.I deleted all sticky blocks a while back.
Chad Parmentier への返信

Re: Blocks disappear when moving from left to right.

- Valery Fremaux の投稿

Hi All, I've found a silly bug that was resulting in same effect :

The fix is :

in lib/blockslib.php

function blocks_get_by_page($page) {
    $blocks = get_records_select('block_instance', "pageid = '". $page->get_id() .
                "' AND pagetype = '". $page->get_type() ."'", 'position, weight');

    $positions = $page->blocks_get_positions();
    $arr = array();
    foreach($positions as $key => $position) {
        $arr[$position] = array();
    }

    if(empty($blocks)) {
        return $arr;
    }

    foreach($blocks as $block) {
        // very important fix. Fixes lost blocks in flexipage and front page format
        // renumbers the duplicate weights in order...
        while (array_key_exists($block->weight, $arr[$block->position])){
            $block->weight++;
            update_record('block_instance', $block);
        }
        $arr[$block->position][$block->weight] = $block;
    }
    return $arr;
}

Maybe it has something to do with the error you're experimenting. It fixed all weird behaviour definitively in our instances. I'll seek for a tracker entry... may help.

Problem is that some block moves do not calculate correctly the weight of the landing block, and weight duplicates appear in database. This fix recalculates dynamically the weights of the blocks in the page so they are in correct order, and no one is forgotten. Beware : you may have some ghosts reviving !! ウインク

Cheers.

Valery Fremaux への返信

Re: Blocks disappear when moving from left to right.

- Chad Parmentier の投稿
I tried editing blocklib and it caused the entire site to only display a white page. I will post a copy of my blocklib.php maybe I made a mistake in the code. any help would be appreciated!

P.S. The resources block and the calendar block are the only blocks missing from what I can tell.