setBlockLimit() seems not working on 5.4.0RC1

Permalink 1 user found helpful
Hi folks!
I've successfully installed the 5.4.0RC1 on a subdomain root.
I've uploaded one of my "stress test" theme and it seems that setBlockLimit() does not working on 5.4.0RC1.
I've performed a string search for "setBlockLimit" using 'find' and 'grep' in the whole concrete5 5.4.0RC1 file set but it returned no results.
Is it not implemented in the release 5.4?
Anyone knows about that?

digitmaster
 
digitmaster replied on at Permalink Reply
digitmaster
Apologize.
It works.
Sorry, 3 o'clock in the night.
I did some mistakes.
This post should be deleted.
Thanks
Shotster replied on at Permalink Reply
Shotster
I've not tried to use it, but the method is defined in concrete/models/area.php in my 5.4.0RC1 installation.

-Steve
suzykaploozie replied on at Permalink Reply
suzykaploozie
What were you doing incorrectly? Mine isn't working in this version either. Here's an example of what I have:

<?php
       $menu = new Area('Menu');
       $menu->display($c);
       $menu->setBlockLimit(1);
       ?>
suzykaploozie replied on at Permalink Reply
suzykaploozie
What were you doing incorrectly? Mine isn't working in this version either. Here's an example of what I have:

<?php
       $menu = new Area('Menu');
       $menu->display($c);
       $menu->setBlockLimit(1);
       ?>
digitmaster replied on at Permalink Reply
digitmaster
Hi!
Thanks, but from my first autoreply I wrote that it was my mistake.

And you're replying to a post of 4 months ago regarding an old release. What is the sense?

regards
suzykaploozie replied on at Permalink Reply
suzykaploozie
You misunderstood my question - please disregard, I was able to receive help in another post.

Best regards,

Suzy
digitmaster replied on at Permalink Reply
digitmaster
A post that you did one day after your first one here. On the other post you was really clear and detailed. They haven't misunderstood. Who's guilty?

http://www.concrete5.org/community/forums/themes/setblocklimit-not-...

regards.
marior replied on at Permalink Reply
Hi All

I have a problem related to setBlockLimit(1). In edit mode, after inserting a content, still appears the "Add" layer. Only when I refresh the page, the layer disappears and all works well. The some behavior when I try to remove a content.

Can someone help me on this?

BR
Mario
jordanlev replied on at Permalink Reply
jordanlev
I've experienced this too -- I think it's just a bug in the system and there's nothing you can do about it.
marior replied on at Permalink Reply
:(
I hope the team is working on this.....

Thanks for the replay...
Remo replied on at Permalink Reply
Remo
I can't find any problems with it..

are you sure you don't have to call setBlockLimit before you call display?
marior replied on at Permalink Reply
Yes,

$content = new Area('Content 1'); $content->setBlockLimit(1); $content->display($c);

Should it depend on browser? I''m using chrome and Firefox...
miron replied on at Permalink Reply
Hi, this only happens when you edit the area the first time.

Just make your changes save them and the next time you edit this area the edit block options shouldnt appear.
mhawke replied on at Permalink Reply
mhawke
Has anyone found this to be a problem? I still have this happening.

Here's my code:
<?
$a = new Area('teamRoster');
$a->setBlockLimit(2);
$a->display($c);
?>


If there are 2 blocks currently in the area, edit mode will initially exhibit the proper behaviour and not allow me to add another block. If I delete one of the blocks, it will still not allow me to add another block even though there is now only one block in the area. If I refresh the page, it will allow me to add another block.

Related problem. Same area as above with a limit of 2. If I have only one block in this area and go to add another, I can continue to add blocks past the limit of 2. Once again, if I refresh my page after filling the area with the limit of 2 blocks, I cannot add any more.

This seems to behave like this because the page doesn't get refreshed automatically between add/deletes and so the server-side variables necessary for the setBlockLimit function remain the same values as they were upon first loading the page. They can't be altered client-side when the DOM gets manipulated during add/delete activities.

Clear as mud?
jordanlev replied on at Permalink Reply
jordanlev
I've found that to be a problem as well. You should submit a bug report about it.
sarah3585 replied on at Permalink Reply
sarah3585
Also seeing this issue today.
sarah3585 replied on at Permalink Reply
sarah3585
I'm still having this issue in 5.6

Bug report:http://www.concrete5.org/index.php?cID=379513...
yoschi replied on at Permalink Reply
yoschi