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.


Main Content

Login / Search

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

Well-settled

trying random content

I attempted to edit the start page with

Code

[block="event"]main_content[/block]
and when I tried the preview got

Code

Unfortunately a query has failed [SELECT COUNT(*) as cnt FROM ocp3_calendar_events WHERE e_validated=1] [Unknown column 'e_validated' in 'where clause'] (ocPortal version: 3.0.2, PHP version: 4.4.3-dev, URL: /data/preview.php?page=cms_comcode_pages&type=_ed)
Here is the stack trace:

Below is a stack trace revealing the state ocPortal was in when the error occured. 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    '/home/rpgdfw/www/www/sources/global2.php'
Line    '669'
Function    'get_html_trace'
Args    

File    '/home/rpgdfw/www/www/sources/database/mysql.php'
Line    '163'
Function    'clean_exit'
Args    

object

File    '/home/rpgdfw/www/www/sources/database.php'
Line    '622'
Function    '_db_query'
Args    

'SELECT COUNT(*) as cnt FROM ocp3_calendar_events WHERE e_validated=1'

array

NULL

NULL

false

false

File    '/home/rpgdfw/www/www/sources/database.php'
Line    '581'
Function    '_query'
Class    'database_driver'
Type    '->'
Args    

'SELECT COUNT(*) as cnt FROM ocp3_calendar_events WHERE e_validated=1'

NULL

NULL

false

File    '/home/rpgdfw/www/www/sources/blocks/main_content.php'
Line    '164'
Function    'query'
Class    'database_driver'
Type    '->'
Args    

'SELECT COUNT(*) as cnt FROM ocp3_calendar_events WHERE e_validated=1'

File    '/home/rpgdfw/www/www/sources/zones.php'
Line    '809'
Function    'run'
Class    'block_main_content'
Type    '->'
Args    

array

File    '/home/rpgdfw/www/www/sources/tempcode.php'
Line    '698'
Function    'do_block'
Args    

'main_content'

array

File    '/home/rpgdfw/www/www/sources/symbols.php'
Line    '50'
Function    'handle_symbol_preprocessing'
Args    

array

array

File    '/home/rpgdfw/www/www/sources/tempcode.php'
Line    '1,304'
Function    'evaluate_conventional_symbol'
Args    

NULL

array

0

'BLOCK'

array

File    '/home/rpgdfw/www/www/sources/misc_scripts.php'
Line    '57'
Function    'evaluate'
Class    'ocp_tempcode'
Type    '->'
Args    

File    '/home/rpgdfw/www/www/data/preview.php'
Line    '40'
Function    'preview_script'
Args    
Back to the top
 
Posted
Rating:
#20346
Avatar



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:
#20355
Avatar

Well-settled

main_content filter

Thanks! That worked like a charm.

However, I wanted to restrict the content. So I modified it with

Code

[block="event" filter="56,55"]main_content[/block]
and I got the following error

Code

 Unfortunately a query has failed [SELECT COUNT(*) as cnt FROM ocp3_calendar_events WHERE validated=1 AND (=56 OR =55)] [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 '=56 OR =55)' at line 1] (ocPortal version: 3.0.2, PHP version: 4.4.3-dev, URL: /data/preview.php?page=cms_comcode_pages&type=_ed)
Here is the stack trace:

Below is a stack trace revealing the state ocPortal was in when the error occured. 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    '/home/rpgdfw/www/www/sources/global2.php'
Line    '669'
Function    'get_html_trace'
Args    

File    '/home/rpgdfw/www/www/sources/database/mysql.php'
Line    '163'
Function    'clean_exit'
Args    

object

File    '/home/rpgdfw/www/www/sources/database.php'
Line    '622'
Function    '_db_query'
Args    

'SELECT COUNT(*) as cnt FROM ocp3_calendar_events WHERE validated=1 AND (=56 OR =55)'

array

NULL

NULL

false

false

File    '/home/rpgdfw/www/www/sources/database.php'
Line    '581'
Function    '_query'
Class    'database_driver'
Type    '->'
Args    

'SELECT COUNT(*) as cnt FROM ocp3_calendar_events WHERE validated=1 AND (=56 OR =55)'

NULL

NULL

false

File    '/home/rpgdfw/www/www/sources/blocks/main_content.php'
Line    '164'
Function    'query'
Class    'database_driver'
Type    '->'
Args    

'SELECT COUNT(*) as cnt FROM ocp3_calendar_events WHERE validated=1 AND (=56 OR =55)'

File    '/home/rpgdfw/www/www/sources/zones.php'
Line    '794'
Function    'run'
Class    'block_main_content'
Type    '->'
Args    

array

File    '/home/rpgdfw/www/www/sources/tempcode.php'
Line    '698'
Function    'do_block'
Args    

'main_content'

array

File    '/home/rpgdfw/www/www/sources/symbols.php'
Line    '50'
Function    'handle_symbol_preprocessing'
Args    

array

array

File    '/home/rpgdfw/www/www/sources/tempcode.php'
Line    '1,304'
Function    'evaluate_conventional_symbol'
Args    

NULL

array

0

'BLOCK'

array

File    '/home/rpgdfw/www/www/sources/misc_scripts.php'
Line    '57'
Function    'evaluate'
Class    'ocp_tempcode'
Type    '->'
Args    

File    '/home/rpgdfw/www/www/data/preview.php'
Line    '40'
Function    'preview_script'
Args    
Back to the top
 
Posted
Rating:
#20357
Avatar

I'm not going to treat this as a regular bug. The error message shouldn't really appear, and that'll be corrected in the next version, but for this release, it's not possible to use category selection on events like this (just to confirm - the filter works on categories, not entries).
However, for the next minor release I'll extend it a bit, because I now see that events could be filtered nicely by using the event type as a category. If you'd like to do that…

Change line 29 of sources/hooks/systems/awards/event.php from:

Code

      $info['category_field']=NULL;
to:

Code

      $info['category_field']='e_type';


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
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: