Cheers again Gez,
I'm in the process of doing find and replace. Incase anyone's reading this here's a list of my find and replaces:
.DS. > .DIRECTORY_SEPARATOR.
JModel\n > JModelLegacy\n
JModel:: > JModelLegacy::
JController\n > JControllerLegacy\n
JView\n > JViewLegacy\n
JFile::read > file_get_contents
JRequest::getCmd > JFactory::getApplication()->input->get
JRequest::getVar > JFactory::getApplication()->input->get
JRequest::checkToken > JSession::checkToken
JURI > JUri
JHTML:: > JHtml::
JUtility::getToken > JSession::getFormToken
onclick="checkAll > onclick="Joomla.checkAll
I basically worked my way through the Potential Backwards Compatiblity document and these are the bits that applied to my component - other folks mileage may vary of course!
Everything is working now and all views of the component are accessible - however in the edit views my "Cancel", "Save and Cancel" and "sidebar-nav" menu don't work and any radio buttons in the form have stacked on top of each other?!
and when I set the Error Reporting to "Development" it shows me lots of Strict Standards warnings - some saying
"Non-static method XXXXX should not be called statically in /XXXXXX/XXXXX/XXXX..." or
"Only variables should be assigned by reference in XXXXX" and
"Declaration of XXXXXXControllerXXXXXXX::display() should be compatible with JControllerLegacy::display($cachable = false, $urlparams = Array) in /XXXX/XXXX/..."
Now the
"only variables should be assigned by reference..." warnings are generated because in some files JFactory is preceded by an ampersand (i.e. &JFactory). From what I can gather, the ampersand before the function is a throwback to pre php 5 that declares that the method (or function) returns a reference - now this happens automatically in php 5+ apparently...
I am assuming now that these Strict Standards errors are benign as there is no "Fatal" errors and the fact my "sidenav-bar" and Cancel/Save&Cancel buttons aren't working is down to something else (Javascript maybe?). I'm edging closer now if anyone has any advice on how to go about troubleshooting the buttons I'd be very gratefull
All the best
Elliot
edit:
I'm getting errors in my browsers Inspector relating to this line:
jQuery("#adminForm").validationEngine();
Type Issue
'undefined' is not a function (evaluating 'jQuery("#adminForm").validationEngine()')
and crucially (I think?!) I'm getting a:
Reference Issue
Can't find variable: jQuery
Looking at the script declarations in the header of the page it shows
jquery.validationEngine.js being loaded before the actual jQuery script!
I'm going to try making the validationEngine load AFTER jQuery and report back...
edit 2:
Ok so in the admin side helper.php, in the
headerDeclerations function I've commented out the line:
$doc->addScript($componentUrlAdmin . '/js/jquery.validationEngine.js');
and now I'm manually echoing it in the tmpl and my buttons are working!!!!!
This seems like a bit of a hack at best - can anyone suggest a better way around declaring the validationEngine.js after Joomla's main jquery.js declaration?
I feel slightly victorious, so I'm going to celebrate by moving on to the next step of messing around with the front end views. No rest for the wicked...