Recent Topics

1 Jan 29, 2009 10:25    

My b2evolution Version: 2.x

Hello.

I just ran across this possible problem a few hours ago and found the solution to it.

If you create a post using the 'Simple' form, the record in the database table 'items__item' shows 'NULL' for 'post_ptyp_ID' (the table's default value). If you use the 'Expert' form, 'post_ptyp_ID' has a value e.g. 1 for 'Post' and it is written to the database upon saving.

What does this directly affect?

A: Sticky Post sorting at a minimum.

You can solve the sorting problem either by editing the post using the expert form whereby the post_ptyp_ID will be assigned a value just by saving the form again OR you can manually change the post_ptyp_ID in the database via e.g. phpMyAdmin.

The long-term solution is to add a conditional statement to 'inc/items/item_simple.form.php' that checks to see if the post is being created vs. edited. If created, assign a default value of '1' to the post_ptyp_ID in the form object. The value in the database should NEVER be 'NULL'.

HTH.

2 Jan 29, 2009 16:33

The core was alerted, it will be fixed.

3 Jan 29, 2009 16:58

Fixed in CVS HEAD and v-2-4. Thanks for reporting!

4 Jan 29, 2009 17:06

The core speaks !!!!

¥

5 Jan 29, 2009 21:26

¥åßßå,

You know the core and I are old buddies!


Form is loading...