Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
New database field default value is not saving

 

 


programthis
New User

Oct 7, 2009, 6:15 PM

Post #1 of 3 (1616 views)
Shortcut
New database field default value is not saving Can't Post

I created a new field in the article table via the database editor. I set:
Field Type: text box
Stored as: memo
Default value:
<div id="topAd">
<img src="/_assets/images/slug_83x9.gif" width="83" height="9" border="0" alt="advertisement" class="slug" />
<a href="#"><img src="/_assets/images/TEMP-home-ad-top.jpg" width="300" height="250" border="0" alt="" /></a>
</div>

Editor type: WYSIWYG

The default value, I assume, should be saved to the database for every article right? The field is created but is empty for every article and I have an empty textarea when I edit articles.

What am I doing wrong?


programthis
New User

Oct 7, 2009, 9:20 PM

Post #2 of 3 (1610 views)
Shortcut
Re: [programthis] New database field default value is not saving [In reply to] Can't Post

Update to my previous post:

The default value does show up when I add new articles, it just does not appear when editing an existing article.

I fixed the issue by updating the DB table with the default value for each existing article.


(This post was edited by programthis on Oct 7, 2009, 11:19 PM)


Donna
Staff / Moderator


Oct 9, 2009, 1:21 PM

Post #3 of 3 (1583 views)
Shortcut
Re: [programthis] New database field default value is not saving [In reply to] Can't Post

Hi there,

That's working as intended -- changing a default value won't modify anything in the existing articles, because those existing articles already had a value (even if the value was nothing.) Basically, the default value pre-fills out a field for you.

Glad to hear you've already found the workaround -- updating the default value directly. : )

Donna

--
support@interactivetools.com