Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Blog Module /

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

widgets have wrong parentid - multiple widgetareas in the db


Reply


2 Posts   1171 Views

Avatar
pst

Community Member, 9 Posts

10 October 2009 at 5:04am

Hey,

I have a strange problem with the blog module and the widgets. The following is the db after a /dev/reset

mysql> SELECT * FROM WidgetArea;
+----+------------+---------------------+---------------------+
| ID | ClassName | Created | LastEdited |
+----+------------+---------------------+---------------------+
| 1 | WidgetArea | 2009-10-09 17:57:39 | 2009-10-09 17:57:39 |
+----+------------+---------------------+---------------------+
1 row in set (0.00 sec)

mysql> SELECT * FROM Widget;
+----+----------------------+---------------------+---------------------+------+----------+
| ID | ClassName | Created | LastEdited | Sort | ParentID |
+----+----------------------+---------------------+---------------------+------+----------+
| 1 | BlogManagementWidget | 2009-10-09 17:57:39 | 2009-10-09 17:57:39 | 0 | 1 |
| 2 | TagCloudWidget | 2009-10-09 17:57:39 | 2009-10-09 17:57:39 | 0 | 1 |
| 3 | ArchiveWidget | 2009-10-09 17:57:39 | 2009-10-09 17:57:39 | 0 | 1 |
+----+----------------------+---------------------+---------------------+------+----------+
3 rows in set (0.00 sec)

All seems fine, there are three widgets and they have the ParentID 1 which seems to be the WidgetArea from the first query. Sadly the widgets do now show up in the template.

In the CMS widgets currenty used is empty. If I add some, they show up in the admin. Saving them says "saved" but they still do not show up on the page. After a reload of the CMS they are also not in the widgets currently used list anymore.

The db looks like this now:

mysql> SELECT * FROM WidgetArea;
+----+------------+---------------------+---------------------+
| ID | ClassName | Created | LastEdited |
+----+------------+---------------------+---------------------+
| 1 | WidgetArea | 2009-10-09 17:57:39 | 2009-10-09 17:57:39 |
| 2 | WidgetArea | 2009-10-09 18:02:41 | 2009-10-09 18:02:41 |
+----+------------+---------------------+---------------------+
2 rows in set (0.00 sec)

mysql> SELECT * FROM Widget;
+----+----------------------+---------------------+---------------------+------+----------+
| ID | ClassName | Created | LastEdited | Sort | ParentID |
+----+----------------------+---------------------+---------------------+------+----------+
| 1 | BlogManagementWidget | 2009-10-09 17:57:39 | 2009-10-09 17:57:39 | 0 | 1 |
| 2 | TagCloudWidget | 2009-10-09 17:57:39 | 2009-10-09 17:57:39 | 0 | 1 |
| 3 | ArchiveWidget | 2009-10-09 17:57:39 | 2009-10-09 17:57:39 | 0 | 1 |
| 4 | TagCloudWidget | 2009-10-09 18:02:41 | 2009-10-09 18:02:41 | 0 | 2 |
+----+----------------------+---------------------+---------------------+------+----------+
4 rows in set (0.00 sec)

As you can see, instead of adding the widget to the existing widget area, a new one ID=2 got created and the TagCloudWidget with ID=4 got ParentID=2. Strange thing is, this did already work for me. Just not after a /dev/reset

Another strange thing is, for the faqs module the widgets work perfecty.

Any ideas what I can do?

Avatar
pst

Community Member, 9 Posts

10 October 2009 at 6:05am

I forgot to mention that. The problem is relatively easy to fix, by manually updating the SideBarID of the Blog_Holder. Although I doubt this is working as intended. :)