Alexandra Faller
Alexandra Faller

Reputation: 21

Updating joomla admin component from 2.5 to 3.x

I'm trying to update our templates and current modules and backend admin components to work with Joomla 3.

I've updated the component file to use JControllerLegacy etc where needed, and I can see it in my backend - basically. It's a field you put a string of information in, and that gets saved to the database and then gets re-used in other modules.

I can input stuff into the text field, but if I go to click save, save and close, or cancel absolutely nothing happens.

I haven't missed any files out as this was a direct import from a working version on 2.5.x and when I run web console it tells me:

TypeError: b is null @ /media/system/js/core.js:4

and

Empty string passed to getElementById(). @ /media/jui/js/jquery.min.js:2

Which I assumed was that it was trying to tell me the text field was empty. However, no matter what's in there, it still doesn't do anything, and I would have thought the cancel wouldn't matter if there was anything in the box or not.

Any pointers would be great.

Upvotes: 1

Views: 1352

Answers (3)

schlumpfi_coder
schlumpfi_coder

Reputation: 11

the JToolBarHelper:save(); was replaced with JToolBarHelper::save2new(); in further Joomla3 Versions

Upvotes: 0

Michael
Michael

Reputation: 992

Take a look at this page - http://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_3.0_and_Joomla_Platform_12.1

Some things have changed between 2.5 and 3.0, mostly dealing with dropping 1.5 style code. Also, take a look at the core components and use them as references to verify what you're doing is right.

Upvotes: 1

Bakual
Bakual

Reputation: 2731

Do you have the hidden inputfield <input type="hidden" name="task" value="" /> in your form?

When clicking a button, the Javascript function Joomla.submitbutton(task) is called. This should be defined/overriden in your layout to make some checks and then call Joomla.submitform(task), which fills the task into the hidden field and sends the form.

I think these functions have changed their name someday. Maybe you still got them without the Joomla prefix?

Upvotes: 3

Related Questions