nikkishri / dropthings

Automatically exported from code.google.com/p/dropthings
0 stars 0 forks source link

Layout problem AGAIN #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put one widget in each columun 
2. Change the layout from 3 columuns to 1 or 2 columuns
3. the widgets that are in column 2 or 3 disappear

What is the expected output? What do you see instead?
The widgets should be repositioned in the remaining columns

What version of the product are you using? On what operating system?
Release 2.3.2 since changes r80

Original issue reported on code.google.com by laurent....@gmail.com on 3 Nov 2009 at 1:21

GoogleCodeExporter commented 9 years ago
This problem come since you have added cache for queries. The database is ok 
but cache 
is not updated with changes (i think !!) 

Original comment by laurent....@gmail.com on 8 Dec 2009 at 1:55

GoogleCodeExporter commented 9 years ago
I disable the cache in web.config and all is working well

Original comment by laurent....@gmail.com on 8 Dec 2009 at 2:03

GoogleCodeExporter commented 9 years ago

Original comment by glope...@gmail.com on 15 Feb 2010 at 3:58

GoogleCodeExporter commented 9 years ago
This should be fixed in latest code. Can you please verify? Take the latest 
code form 
source code, not the latest release.

Original comment by omaralzabir@gmail.com on 15 Feb 2010 at 4:07

GoogleCodeExporter commented 9 years ago
Omar, today I tried with r102, and reproduce this behavior

Original comment by glope...@gmail.com on 15 Feb 2010 at 4:18

GoogleCodeExporter commented 9 years ago
I guess it's because when we modify the page layout cache, data are not updated 
but 
removed. For instance, in the WidgetInstanceRepository.cs file

public void Update(WidgetInstance wi, Action<WidgetInstance> detach, 
Action<WidgetInstance> postAttachUpdate)
{
  RemoveWidgetInstanceCacheEntries(wi.Id);

_database.UpdateObject<WidgetInstance>(DropthingsDataContext.SubsystemEnum.Widge
tInst
ance, wi, detach, postAttachUpdate);
}

Data are updated in the database, but removed from the cache... So if we use 
the 
cache, data are wrong (widgets from removed columns are removed too instead of 
moving)

Original comment by nourdine...@gmail.com on 17 Feb 2010 at 4:24

GoogleCodeExporter commented 9 years ago
I modified the source code for updating the cache (not exactly updating, but 
removing 
and adding data) everywhere I thought it was necessary, but it doesn't work 
better.

I can't follow yet all the process for knowing where to put widgets on zones 
and so 
on with cache data. I think that manipulating datasets into the cache will be 
easier 
to understand but... If the update of the cache is correct now, I suppose that 
something else is wrong when we use cache data.

Here is a sample of what I did :

public void Update(Column column, Action<Column> detach, Action<Column> 
postAttachUpdate)
{
  RemoveColumnInPageCacheEntries(column); // remove cache data

_database.UpdateObject<Column>(DropthingsDataContext.SubsystemEnum.Column
, column, detach, postAttachUpdate);

  GetColumnById(column.ID); // put data into cache
}

I did that kind of stuff on 8 locations :
ColumnRepository (x3)
PageRepository (x2)
WidgetInstanceRepository (x3)

Original comment by nourdine...@gmail.com on 19 Feb 2010 at 1:06

GoogleCodeExporter commented 9 years ago
Can you check the latest release and see if it's fixed?

Original comment by omaralzabir@gmail.com on 30 Apr 2010 at 6:16