Login Form

#324 – error message when creating new question

Posted in ‘BF Survey’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Wednesday, 13 August 2014 23:02 AEST
smartbusiness
strict standards: Declaration of bfsurvey_plusModelQuestion::prepareTable() should be compatible with JModelAdmin::prepareTable($table) in C:\wamp\www\administrator\components\com_bfsurvey_plus\models\question.php on line 44
Call Stack
# Time Memory Function Location
1 0.0012 248760 {main}( ) ..\index.php:0
2 0.1220 3327176 JApplicationCms->execute( ) ..\index.php:42
3 0.1220 3327704 JApplicationAdministrator->doExecute( ) ..\cms.php:245
4 0.1913 5252792 JApplicationAdministrator->dispatch( ) ..\administrator.php:159
5 0.1985 5388216 JComponentHelper::renderComponent( ) ..\administrator.php:98
6 0.2061 5484600 JComponentHelper::executeComponent( ) ..\helper.php:332
7 0.2068 5518552 require_once( 'C:\wamp\www\administrator\components\com_bfsurvey_plus\bfsurvey_plus.php' ) ..\helper.php:352
8 0.2256 6301272 JControllerLegacy->execute( ) ..\bfsurvey_plus.php:68
9 0.2256 6301472 bfsurvey_plusController->display( ) ..\legacy.php:722
10 0.2274 6419136 JControllerLegacy->display( ) ..\controller.php:74
11 0.2324 6604656 JControllerLegacy->getModel( ) ..\legacy.php:643
12 0.2324 6604832 JControllerLegacy->createModel( ) ..\legacy.php:748
13 0.2324 6605224 JModelLegacy::getInstance( ) ..\legacy.php:563
14 0.2335 6643008 require_once( 'C:\wamp\www\administrator\components\com_bfsurvey_plus\models\question.php' ) ..\legacy.php:184


and


Strict standards: Declaration of TableQuestion::_getAssetParentId() should be compatible with JTable::_getAssetParentId(JTable $table = NULL, $id = NULL) in C:\wamp\www\administrator\components\com_bfsurvey_plus\tables\question.php on line 260
Call Stack
# Time Memory Function Location
1 0.0012 248760 {main}( ) ..\index.php:0
2 0.1220 3327176 JApplicationCms->execute( ) ..\index.php:42
3 0.1220 3327704 JApplicationAdministrator->doExecute( ) ..\cms.php:245
4 0.1913 5252792 JApplicationAdministrator->dispatch( ) ..\administrator.php:159
5 0.1985 5388216 JComponentHelper::renderComponent( ) ..\administrator.php:98
6 0.2061 5484600 JComponentHelper::executeComponent( ) ..\helper.php:332
7 0.2068 5518552 require_once( 'C:\wamp\www\administrator\components\com_bfsurvey_plus\bfsurvey_plus.php' ) ..\helper.php:352
8 0.2256 6301272 JControllerLegacy->execute( ) ..\bfsurvey_plus.php:68
9 0.2256 6301472 bfsurvey_plusController->display( ) ..\legacy.php:722
10 0.2274 6419136 JControllerLegacy->display( ) ..\controller.php:74
11 0.3200 7311952 bfsurvey_plusViewQuestion->display( ) ..\legacy.php:685
12 0.3200 7312208 JViewLegacy->get( ) ..\view.html.php:54
13 0.3200 7312448 JModelLegacy->getState( ) ..\legacy.php:398
14 0.3200 7312720 JModelAdmin->populateState( ) ..\legacy.php:415
15 0.3200 7312752 bfsurvey_plusModelQuestion->getTable( ) ..\admin.php:884
16 0.3200 7313240 JTable::getInstance( ) ..\question.php:105
Thursday, 14 August 2014 16:52 AEST 10'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Hi Albara,
I am aware of this, and it's due to an API difference between Joomla 2.5 and Joomla 3. To support both versions in the same install package, I was forced to use:
protected function prepareTable(&$table)

However this causes the strict standards warning above. It doesn't actually affect the operation of the software, so one work around is to reduce the error reporting setting in your global config, or turn of strict error reporting in your php.ini
Another workaround would be to edit /administrator/components/com_bfsurvey_plus/models/question.php and remove the ampersand in this function (around line 190).

In Joomla 2.5, in /libraries/joomla/applicaiotn/component/modeladmin.php, we have:
//line 821
protected function prepareTable(&$table)

however in Joomla 3, in /libraries/legacy/model/admin.php, we have:
//line 905
protected function prepareTable($table)


Alternatively you can use BF Survey version 2 instead of BF Survey Plus, as this uses Framework on Framework and does not have this issue.

regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
Thursday, 14 August 2014 17:20 AEST
smartbusiness
Thank you for your response

i have installed the website fresh now on an external host and it works perfectly.
once i back it up and restore locally on wamp i get these errors back and a whole lot more (only in bf survey).

1-will bf survy2 solve this problem when running it locally on wamp?
if yes
2-is there an easy way to migrate questions between the sites ?

Best regards
Thursday, 14 August 2014 19:00 AEST 5'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Hi Albara,
Yes BF Survey version 2 will not have this issue on local wamp.
On the maintenance tab, there is a migrate questions button that will help you convert from BF Survey Plus to BF Survey v2. Please refer to:
http://tamlynsoftware.com/products/bf-survey-plus/bf-survey-plus-user-guide-2/import.html

regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
Thursday, 14 August 2014 20:08 AEST
smartbusiness
Thank you Tim for your quick response
unfortunately bf survey v2 locally on wamp gives syntax error 1064 when click on "new question"

Thursday, 14 August 2014 23:52 AEST 5'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Can you set error reporting to maximum in your global config, and see if it gives a more specific error message that might help pinpoint the problem.
Follow us on twitter http://twitter.com/tamlynsoftware
Sunday, 17 August 2014 20:08 AEST
smartbusiness
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 'DER BY a.ordering ASC' at line 4 SQL=SELECT a.bfsurvey_question_id AS value, a.title AS text FROM kyisx_bfsurvey_questions AS a WHERE a.parent=0 and a.bfsurvey_question_id<>0 AND a.enabled=1 AND a.bfsurvey_category_id = ORDER BY a.ordering ASC

this error comes up upon clicking "new question" on wamp, AMPPS, and on inmotion webhosting
Monday, 18 August 2014 23:55 AEST 5'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Looking at this error, it appears that there is no category id in the query
a.bfsurvey_category_id =

I suspect that during the migration of questions from BF Survey Plus to BF Survey v2, it may not have brought across the categories. If you go to the categories view, are there any categories?
Is this still on your localhost? If so, perhaps you can send me an export from phpMyAdmin of your database tables
kyisx_bfsurvey_questions
kyisx_bfsurvey_categories

I'll load them onto my test site and see what the problem is.

regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.
Go to top