Hey there,
it's been a (a very long) while, I wrote a module for a small non-profit-organisation. It ran under CMSMS 1.11.
I forgot about it, but now they upgraded to CMSMS 2 and wonder, why nothing works anymore
I didn't follow the changes around CMSMS all the years, but I want to help them by repairing the module.
Is there a way to get an overview about the necessary changes to the code?
Thanks a lot!
Upgrade or rewrite Module for CMSMS 2
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Upgrade or rewrite Module for CMSMS 2
There are several changes in the API's between CMSMS 1.11 and 2.2 (and more to come in the beta version)
Though you should be able to update your modules relatively easily with access to the error log.
The biggest changes are:
- We use multiple smarty templates, with scopes. So you cannot assume that a variable created in a module action template is available outside of that template.
- DON"T assume that $gCms is a global variable. though we do include it in scope for some things, you just can't assume that it's a global. Use cmsms() if you must.
- v2.0 removed the GetNotification... methods from the module API
- v2.0 removed a bunch of API methods that were deprecated in 1.12 or earlier. Even more stuff is deprecated now.
- v2.0 refactored the way that WYSIWYG and Syntax hilighter modules worked
- v2.0 broke admin themes.
i got this from the various threads in the announcements forum. Going as far back as the 2.0-beta1 announcement.
Note: The API documentation is reasonably up to date and lists most of the deprecated functions.
and to cover yourself for v2.3
- Make sure you aren't assuming paths to module files. Use GetModulePath() and GetModuleURLPath().
- Watch usage of $smarty->assign_by_ref()
- $this->smarty is gone out of the module api because of scopes.
- Modules that export content types cannot be lazy loaded.
- Prototypes to smarty plugins change because of newer versions of smarty.
---
if you have a specific question, just ask.
Though you should be able to update your modules relatively easily with access to the error log.
The biggest changes are:
- We use multiple smarty templates, with scopes. So you cannot assume that a variable created in a module action template is available outside of that template.
- DON"T assume that $gCms is a global variable. though we do include it in scope for some things, you just can't assume that it's a global. Use cmsms() if you must.
- v2.0 removed the GetNotification... methods from the module API
- v2.0 removed a bunch of API methods that were deprecated in 1.12 or earlier. Even more stuff is deprecated now.
- v2.0 refactored the way that WYSIWYG and Syntax hilighter modules worked
- v2.0 broke admin themes.
i got this from the various threads in the announcements forum. Going as far back as the 2.0-beta1 announcement.
Note: The API documentation is reasonably up to date and lists most of the deprecated functions.
and to cover yourself for v2.3
- Make sure you aren't assuming paths to module files. Use GetModulePath() and GetModuleURLPath().
- Watch usage of $smarty->assign_by_ref()
- $this->smarty is gone out of the module api because of scopes.
- Modules that export content types cannot be lazy loaded.
- Prototypes to smarty plugins change because of newer versions of smarty.
---
if you have a specific question, just ask.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Upgrade or rewrite Module for CMSMS 2
Might help: viewforum.php?f=83
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Upgrade or rewrite Module for CMSMS 2
I know the forum - it is the one, we are writing inRolf wrote:Might help: viewforum.php?f=83
But I didn't find I a topic addressing my question - did I miss something?
Re: Upgrade or rewrite Module for CMSMS 2
calguy1000 wrote:There are several changes in the API's between CMSMS 1.11 and 2.2 (and more to come in the beta version)
Though you should be able to update your modules relatively easily with access to the error log.
The biggest changes are:
- We use multiple smarty templates, with scopes. So you cannot assume that a variable created in a module action template is available outside of that template.
- DON"T assume that $gCms is a global variable. though we do include it in scope for some things, you just can't assume that it's a global. Use cmsms() if you must.
- v2.0 removed the GetNotification... methods from the module API
- v2.0 removed a bunch of API methods that were deprecated in 1.12 or earlier. Even more stuff is deprecated now.
- v2.0 refactored the way that WYSIWYG and Syntax hilighter modules worked
- v2.0 broke admin themes.
i got this from the various threads in the announcements forum. Going as far back as the 2.0-beta1 announcement.
Note: The API documentation is reasonably up to date and lists most of the deprecated functions.
and to cover yourself for v2.3
- Make sure you aren't assuming paths to module files. Use GetModulePath() and GetModuleURLPath().
- Watch usage of $smarty->assign_by_ref()
- $this->smarty is gone out of the module api because of scopes.
- Modules that export content types cannot be lazy loaded.
- Prototypes to smarty plugins change because of newer versions of smarty.
---
if you have a specific question, just ask.
Thanks - that is a good point to start from!
Re: Upgrade or rewrite Module for CMSMS 2
chriszeu wrote:I know the forum - it is the one, we are writing inRolf wrote:Might help: viewforum.php?f=83
But I didn't find I a topic addressing my question - did I miss something?
No, it is not the same board as the one we are in now...
It is a developers board in the CMSMS 2.0 beta board describing code updates to get modules ready for 2.0
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -