fastslack/jUpgradePro

PHP Fatal error: Call to undefined method JUpgradeproModelMigrate::returnError()

Closed this issue · 11 comments

Hi,

this is while an error rised up during the module migration step.

I've placed an error_log entry just in front of the call to method returnError showing the exception message which is:

[04-Apr-2014 18:32:15] Unknown column 'numnews' in 'field list' SQL=INSERT INTO jos_modules (title,content,ordering,position,checked_out,checked_out_time,published,module,numnews,access,showtitle,params,iscore,client_id,control) VALUES ('Main Menu','','7','position-7','0','0000-00-00 00:00:00','1','mod_mainmenu','0','0','0','menutype=mainmenu\nmenu_style=list\nstartLevel=0\nendLevel=0\nshowAllChildren=0\nwindow_open=\nshow_whitespace=0\ncache=0\ntag_id=\nclass_sfx=\nmoduleclass_sfx=_menu\nmaxdepth=10\nmenu_images=0\nmenu_images_align=0\nmenu_images_link=0\nexpand_menu=0\nactivate_parent=0\nfull_active_id=0\nindent_image=0\nindent_image1=\nindent_image2=\nindent_image3=\nindent_image4=\nindent_image5=\nindent_image6=\nspacer=\nend_spacer=\n\n','1','0','')

So jUpgrade seems to await the column numnews in table jos_modules which ist not present.

Best regards
level420

Forgot to say: this is a migration from 1.5 to 2.5.19

Are you using database or RESTful method?

Is strange that you have numnews column on your Joomla! 1.5 schema. Its not by default.

I'm using the RESTfull method.
No idea where the column comes from. Mabe from Joomfish?

Sorry, seems that numnews yes is there by default :-P So this patch bb3038a sort that issue.

Thanks for reporting

Thank you for fixing this.

Would you mind fixing also the pre bug where the reportError method is missing in JUpgradeproModelMigrate?
If I didn't had the knowledge to catch the error message with error_log I'd never seen what caused the problem. A normal user only sees that the migration stopped, without getting an error message.

Thank you.

Best regards...

Are you enabling the debug?

Sorry for being late with my answer.

Yes! I've set:

"Enable PHP error_reporting" -> Yes
"Debug checks and cleaup" -> Yes
"Debug steps" -> Yes
"Debug migration" -> Yes.

The last message I'm seeing is:

[STEP modules]

{"id":"10","name":"modules","title":"Core Modules","class":"JUpgradeproModules","tbl_key":"id","source":"modules","destination":"modules","cid":"0","status":"1","total":"21","start":"0","stop":"20","laststep":"weblinks","chunk":"100","first":"1","old_ver":"1.5","_table":"#__jupgradepro_steps","debug":"{{{5}}}"}

I'm sorry but I've tested your fix which did not work because it tested for the target installationto be greater or equal 3.0, which does not apply to my case where the target ist Joomla 2.5. So I think the fix should be:

if (version_compare(JUpgradeproHelper::getVersion('new'), '2.5', '>='))
unset($row->numnews);

Fixed now. Thanks! b71c89a

Thank you for the fix!

But this does not fix the missing reportError method problem.

I think this should be fixed as well!

Regards
level420

Added the missing functions. eb46e95