HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Post comment to gallery error

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#35796 (In Topic #8063)
Avatar

Community saint

Thsi error comes up when trying to post a comment to the gallery.

 Hi guys, this error just came up when testing.




 Unfortunately a query has failed [UPDATE smf_boards SET ID_LAST_MSG=123, numPosts=(numPosts+1), lastUpdated=1192244840 WHERE ID_BOARD=27 LIMIT 1] [Unknown column 'lastUpdated' in 'field list'] (ocPortal version: 3.2.2, PHP version: 4.4.4, URL: /ocportal/site/index.php?page=galleries&type=misc)

Here is the stack trace:

Below is a stack trace revealing the state ocPortal was in when the error occurred. If this represents a bug in ocPortal's unmodified software, you may want to check ocportal.com for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, the human situation, version numbers, and any other appropriate information.
We apologise for this problem and hope you will work with us so that we can fix it promptly.





 File  '/s101-2/home6/randomas/ocportal/sources/global2.php'
 Line  '725'
 Function  'get_html_trace'
 Args  



 



 File  '/s101-2/home6/randomas/ocportal/sources/database/mysql.php
'
 Line  '171'
 Function  'clean_exit'
 Args  object



 



 File  '/s101-2/home6/randomas/ocportal/sources/database.php'
 Line  '627'
 Function  '_db_query'
 Args  'UPDATE smf_boards SET ID_LAST_MSG=123, numPosts=(numPosts+1), lastUpdated=1192244840 WHERE ID_BOARD=27'

 array

 1

 NULL

 false

 false



 



 File  '/s101-2/home6/randomas/ocportal/sources/database.php'
 Line  '586'
 Function  '_query'
 Class  'database_driver'
 Type  '->'
 Args  'UPDATE smf_boards SET ID_LAST_MSG=123, numPosts=(numPosts+1), lastUpdated=1192244840 WHERE ID_BOARD=27'

 1

 NULL

 false



 



 File  '/s101-2/home6/randomas/ocportal/sources/forum/smf.php'
 Line  '501'
 Function  'query'
 Class  'database_driver'
 Type  '->'
 Args  'UPDATE smf_boards SET ID_LAST_MSG=123, numPosts=(numPosts+1), lastUpdated=1192244840 WHERE ID_BOARD=27'

 1



 



 File  '/s101-2/home6/randomas/ocportal/sources/feedback.php'
 Line  '265'
 Function  'make_post_forum_topic'
 Class  'forum_driver_smf'
 Type  '->'
 Args  'Guest Book'

 'Gallery: Random As (#galleries_root)'

 2

 'Thanks to all who contributed.'

 'Enjoy Compliments of Random As'

 object



 



 File  '/s101-2/home6/randomas/ocportal/site/pages/modules/galleri
es.php'
 Line  '407'
 Function  'do_comments'
 Args  1

 'galleries'

 'root'

 object

 'Gallery: Random As'

 NULL



 



 File  '/s101-2/home6/randomas/ocportal/site/pages/modules/galleri
es.php'
 Line  '256'
 Function  'do_gallery'
 Class  'module_galleries'
 Type  '->'
 Args  



 



 File  '/s101-2/home6/randomas/ocportal/sources/zones.php'
 Line  '323'
 Function  'run'
 Class  'module_galleries'
 Type  '->'
 Args  



 



 File  '/s101-2/home6/randomas/ocportal/sources/site.php'
 Line  '640'
 Function  'load_module_page'
 Args  'site/pages/modules/galleries.php'

 'galleries'



 



 File  '/s101-2/home6/randomas/ocportal/sources/site.php'
 Line  '514'
 Function  'request_page'
 Args  'galleries'

 true



 



 File  '/s101-2/home6/randomas/ocportal/site/index.php'
 Line  '42'
 Function  'do_site'
 Args





Last edit: by OZSlayer

Back to the top
 
Posted
Rating:
#35800
Avatar

I can give a quick fix…

Change line 503 of sources/forum/smf.php from:

Code

      $this->connection->query('UPDATE '.$this->connection->get_table_prefix().'boards SET ID_LAST_MSG='.(string)intval($pid).', numPosts=(numPosts+1), lastUpdated='.strval($time).' WHERE ID_BOARD='.(string)intval($cf),1);
to:

Code

      $this->connection->query('UPDATE '.$this->connection->get_table_prefix().'boards SET ID_LAST_MSG='.(string)intval($pid).', numPosts=(numPosts+1) WHERE ID_BOARD='.(string)intval($cf),1);

However, could you let me know what SMF version you're running?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#35804
Joe
Avatar

Honoured member

May I asked how you pasted the stack trace in such a format?

Back to the top
 
Posted
Rating:
#35831
Avatar

Community saint

Hi Chris, That worked sweet thanks.

Joe I just pasted it from the error report that OCportal makes when the error occured.

Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: