SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: MaTrIx4057 on December 11, 2011, 09:40:04 AM

Title: Page blocks reset.
Post by: MaTrIx4057 on December 11, 2011, 09:40:04 AM
I have problem with pages, i have made 2 pages and for each page i set few blocks to be seen but when i set blocks for second page, the first page blocks reset and i can't see them. It could be something similar to this problem http://simpleportal.net/index.php?topic=10216.0 but only with pages reseting blocks to be seen.
Title: Re: Page blocks reset.
Post by: AngelinaBelle on January 05, 2012, 12:52:52 PM
Could be.  Have you tried the fixes Sinan gave in the other topic?
Title: Re: Page blocks reset.
Post by: jonzr on January 15, 2012, 01:26:44 PM
I've experienced this as well.  It's different from the topic fixes Sinan gave in the other topic. (I applied those fixes anyway though.)

This issue occurs during page edit when selecting which blocks will display for a particular page - only the most recently edited page retains the selection.  In my case, all other pages are reset to display only items in the "Header" and "Footer". 

I'm using SMF 1.1.16 with the following packages:

1.    SMF Sitemap    1.2.2
2.    Tapatalk SMF Plugin    2.1.0
3.    Bot Buster    1.1
4.    Custom Action Mod    2.04
5.    SimplePortal    2.3.4
6.    SMF 1.0.22 / 1.1.16 Update    1.0
7.    Aeva Media    1.4w
Title: Re: Page blocks reset.
Post by: jonzr on January 16, 2012, 08:09:34 PM
Did some further digging and found that the problem may be the update of the smf_sp_blocks table.

For instance, I'd like various blocks to display for 3 pages in particular.  The correct value for those blocks in the smf_sp_blocks table would be

display = 'portal,p2,p3,p4' 

but if page2 is edited and saved, the result is display = 'portal,p2'

So, for whatever reason, "portal" is always saved, but only the most recent page, "p2" in this case.

Manual table fix:
Code: [Select]
update `smf_sp_blocks` set display = 'portal,p2,p3,p4' WHERE display = 'portal,p2'
I'm guessing the problem is in this block of code from PortalAdminPages.php
Code: [Select]
        foreach ($changes as $id => $data)
        {
            db_query("
                UPDATE {$db_prefix}sp_blocks
                SET
                    display = '$data[display]',
                    display_custom = '$data[display_custom]'
                WHERE ID_BLOCK = $id
                LIMIT 1", __FILE__, __LINE__);
        }
Title: Re: Page blocks reset.
Post by: AngelinaBelle on January 26, 2012, 10:16:31 AM
I have noted this at
http://simpleportal.net/index.php?issue=451.0

Whether this proves to be a related or unrelated bug, Sinan will know to check this out during the next development cycle.

I hope you won't mind that I have moved this to the bug reports board.
Title: Re: Page blocks reset.
Post by: [SiNaN] on March 07, 2012, 12:36:12 PM
Tracked here:

http://simpleportal.net/index.php?issue=462.0

It's a different but an even more silly bug.
Title: Re: Page blocks reset.
Post by: [SiNaN] on March 07, 2012, 12:55:45 PM
Fixed in our dev version.
SimplePortal 2.3.8 © 2008-2024, SimplePortal