Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 10:11 am EST

Geeklog Forums

Error posting unmoderatd story only, works fine on moderated


Chase

Anonymous
i am getting following error

Text Formatted Code
Fri 27 Jun 2008 02:39:34 GMT+6 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), 'html', '0', '1', '1', '', '3', '3', '2', '2', '2')' at line 1. SQL in question: REPLACE INTO gl_stories (sid, uid, draft_flag, tid, date, title, introtext, bodytext, hits, numemails, comments, trackbacks, related, featured, show_topic_icon, commentcode, trackbackcode, statuscode, expire, postmode, advanced_editor_mode, frontpage, in_transit, owner_id, group_id, perm_owner, perm_group, perm_members, perm_anon)  VALUES ('20080627023934835', '3', '0', 'Trash', FROM_UNIXTIME(1214555974), 'test', 'http://test.com', 'test', '0', '0', '0', '0', '', '', '1', '0', '0', '', FROM_UNIXTIME(), 'html', '0', '1', '1', '', '3', '3', '2', '2', '2')

Fri 27 Jun 2008 02:39:40 GMT+6 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), 'html', '0', '1', '1', '', '3', '3', '2', '2', '2')' at line 1. SQL in question: REPLACE INTO gl_stories (sid, uid, draft_flag, tid, date, title, introtext, bodytext, hits, numemails, comments, trackbacks, related, featured, show_topic_icon, commentcode, trackbackcode, statuscode, expire, postmode, advanced_editor_mode, frontpage, in_transit, owner_id, group_id, perm_owner, perm_group, perm_members, perm_anon)  VALUES ('20080627023940519', '3', '0', 'Trash', FROM_UNIXTIME(1214555980), 'test', 'http://test.com', 'test', '0', '0', '0', '0', '', '', '1', '0', '0', '', FROM_UNIXTIME(), 'html', '0', '1', '1', '', '3', '3', '2', '2', '2')
 
 Quote

Chase

Anonymous
error is only giving when not using Advanced editor. Meaning when i have intro and body as seperate boxes
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Which Geeklog version is that? Update or fresh install? Professional theme or some other theme?

bye, Dirk
 Quote

Chase

Anonymous
GL1.5.0 Professional theme


 Quote

Chase

Anonymous
GL1.5.0 Professional theme
upgraded from 1.4.1

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Hmm. It's missing the expire time (the date/time for the archive option), but I can't reproduce that.

Did you do anything with that option? Remove it from the editor, enable/disable it, ...?

bye, Dirk
 Quote

Chase

Anonymous
the only thing that i have done to the site is added Cache Library and Media Gallery 1.6

i added the MG tag into the fckditor. But i doubt any of this would bring this issue right?

the site is http://tazakino.com

 Quote

Chase

Anonymous
Dirik

any idea what i should do here?

 Quote

Status: offline

THEMike

Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
geeklog/system/classes/story.class.php

find the loadSubmission function:

Text Formatted Code
 
   /**
     * Loads a submitted story from postdata
     */
    function loadSubmission()
    {
        $array = $_POST;
 


After that add:

Text Formatted Code

        $this->_expire = time();
        $this->_expiredate = 0;
 


to give:

Text Formatted Code

    /**
     * Loads a submitted story from postdata
     */
    function loadSubmission()
    {
        $array = $_POST;
       
        $this->_expire = time();
        $this->_expiredate = 0;

        // Handle Magic GPC Garbage:
        while (list($key, $value) = each($array))
        {
            $array[$key] = COM_stripslashes($value);
        }

        $this->_postmode = COM_applyFilter($array['postmode']);
        $this->_sid = COM_applyFilter($array['sid']);
        $this->_uid = COM_applyFilter($array['uid'], true);
        $this->_unixdate = COM_applyFilter($array['date'], true);

        if (!isset($array['bodytext'])) {
            $array['bodytext'] = '';
        }

        /* Then load the title, intro and body */
        if (($array['postmode'] == 'html') || ($array['postmode'] == 'adveditor')) {
            $this->_htmlLoadStory($array['title'], $array['introtext'], $array['bodytext']);

            if ($this->_postmode == 'adveditor') {
                $this->_advanced_editor_mode = 1;
                $this->_postmode = 'html';
            } else {
                $this->_advanced_editor_mode = 0;
            }
        } else {
            $this->_advanced_editor_mode = 0;
            $this->_plainTextLoadStory($array['title'], $array['introtext'], $array['bodytext']);
        }

        $this->_tid = COM_applyFilter($array['tid']);

        if (empty($this->_title) || empty($this->_introtext)) {
            return STORY_EMPTY_REQUIRED_FIELDS;
        }

        return STORY_LOADED_OK;
    }
 


This should I believe resolve your issue.
 Quote

Status: offline

Chase

Forum User
Regular Poster
Registered: 03/14/08
Posts: 110
Location:Karachi, Pakistan
Problem solved!!

Smile

thanks guys

--
http://TazaKino.com - Pakistani News
Where YOU report the news
 Quote

All times are EST. The time is now 10:11 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content