Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
level420 opened this issue Apr 4, 2014 · 11 comments

Comments

@level420
Copy link

level420 commented Apr 4, 2014

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

@level420
Copy link
Author

level420 commented Apr 4, 2014

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

@fastslack
Copy link
Owner

Are you using database or RESTful method?

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

@level420
Copy link
Author

level420 commented Apr 4, 2014

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

@fastslack
Copy link
Owner

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

Thanks for reporting

@level420
Copy link
Author

level420 commented Apr 5, 2014

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...

@fastslack
Copy link
Owner

Are you enabling the debug?

@level420
Copy link
Author

level420 commented Apr 7, 2014

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}}}"}

@level420
Copy link
Author

level420 commented Apr 7, 2014

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);

@fastslack
Copy link
Owner

Fixed now. Thanks! b71c89a

@level420
Copy link
Author

level420 commented Apr 8, 2014

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

@fastslack
Copy link
Owner

Added the missing functions. eb46e95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants