[jonah] Re: Adding channels fails in Jonah CVS HEAD

Joe Jenkins joe at nerdnet.com
Wed Nov 19 15:17:06 PST 2003


Thanks very much Chuck!

Joe Jenkins


"Chuck Hagenbuch" <chuck at horde.org> wrote in message
news:20031119145939.84re1w4gsgcw0oks at marina.horde.org...
> Quoting Joe Jenkins <joe at nerdnet.com>:
>
> > Adding channels in the News Admin fails with the error:
> >
> >   There was an error saving the channel. DB Error: already exists
> >
> > Browsing the code for this function (below) I noticed it attempts to
fetch
> > the next ID available in the table 'jonah_channels' ...  This is not
working
> > on my installation, I added some debugging code to echo the value of
> > $info['channel_id'] and what it is returning is not the next available
ID in
> > that table.  I browse my table and it should be '125' however this
function
> > is returning 7,8,9 etc (it increments everytime I try to add a news
channel,
> > even if the insert fails, dont ask me why!)  Since channels exist at ID
the
> > numbers returned by $this->_db->nextId('jonah_channels'); obviously it
cant
> > insert a new record there and fails... Any idea what could be breaking
> > $this->_db->nextId('jonah_channels'); ?  I am using a MySQL db and the
rest
> > of my CVS HEAD Horde install seems to be working fine...
>
> Just update the sequence table to have the correct next ID in it. This
will
> happen with the external_channels.sql file, since that doesn't go through
the
> pear sequences.
>
> > ps:  Why isnt this table just set to auto_increment the ID?  Seems it
would
> > be easier to work with, and the code that checks if a channel exists
could
> > actually check to see if the XML/RSS url already exists on another
channel,
> > thus eliminating channel duplicates... just a thought :)
>
> Because auto_increment is a completely non-portable, MySQL specific
concept.
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck at horde.org>
> "I'm really... I'm not too fascinated by green food." - Average Joe
>
> -- 
> Jonah mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: jonah-unsubscribe at lists.horde.org
>





More information about the jonah mailing list