Joomla component upgrade with custom code - joomla

My client purchased a Joomla component, the comoponent need a customization in both front end and back end.
But his requirment is, custom code in front end and back end to be upgrded while upgrading original component.
Example : I bought a component from a company XYZ and the component name is joomla_events, current latest version is 2.0. I done the customization in the version 2.0. Later on the company releases new version 3.0, If the client upgrade the component from version2.0 to version 3.0 then the custom code in the version 2.0 also updated in version 3.0
Please help to do the custom code upgrade in Joomla component.

This is why editing core files is never recommended, because it gets overridden when updated and people then start to have problems.
A simple answer to your question is, you can't have the custom code you added into version 2.0 appear in version 3.0.
You will need to re-add the code you added before. Yes, it is pain taking and annoying, however you would have been better in the first place to develop a plugin which could have been used to extend the component and would make upgrading easy. Not only will you have to add your code again, but you will need to thoroughly test it to ensure it works.

check this may be it helps you....
http://docs.joomla.org/J2.5:Managing_Component_Updates_(Component_release_files)

Related

How to update Laravel Application (not the composer dependencies)

I have an question regarding updates to the framework of a Laravel application.
Normally I run the composer update command to update all of its dependencies. For the laravel framework the package laravel/framework is used.
But they made some changes in this package which require you to make changes in the core application (not in composer). The core application is the package laravel/laravel.
For example, in this commit they have made a function called confirmPassword() which refers to a file ConfirmPasswordController.php in the package laravel/laravel.
But this file didn't exists on my application because my application is not up-to-date.
My question
How do i keep my core application up to date?
Errors
See a typical example of updating the dependencies but not the application here.
First of all... This is not an easy question and IMO there are MANY possible scenarios... Depending on the code you developed, the packages you're using, the version you want to use, and so on...
Anyway This is what I would do in this situation:
Let's say for example I want to upgrade from version X to version Z where Z is two major / minor releases ahead of X
Step 1
Follow the next steps for one major / minor realease at time. Once I've tried to upgrade an application from Laravel 5.4 to 5.6 and it was completely broken. So I decided to upgrade to 5.5 and test the everything was working and, in case, block at that release. Luckily when I've upgraded from 5.5 to 5.6 (after code fix) I've managed to make everything work as it should.
Step 2
Upgrade the core framework and the plugins, check for errors during the upgrade and ofc, check the official documentation for any kind of compatibility problem
Step 3
Laravel has it's own upgrade guide that should be followed step by step. A good chunk of errors can be solved simply following that guide. There may be some plugins that doesn't provide it but usually the problems are releated to new features... It's hard that a method, class or trait has completely changed from one version to another.
Step 4
This step can be omitted, but from the example you've provided maybe it's better to add it. When there is a new feature that requires a specific class or trait or whatsoever, the simplest way to check if the error is thrown because of a file missing (and that is part of the "boilerplate") or has a different nature, is to create an empty project with that specific version and make a comparison with the "default" files.
For example, if you made no changes to the LoginController, checking if the new version has any kind of updates, may be the solution.
You can do this manually, following the upgrade guide for the version you're upgrading from/to, for example this one.
Alternatively, Laravel Shift is a paid but fairly inexpensive tool that will do it for you automatically. Since it's making changes to your project, you should carefully review everything it's done.

After complete rewrite should I restart the version numbers or should continue?

I made a Laravel app as a side project and the final version was 2.6.4
I choosed to rewrite it completely and rename.
I changed blade templating to Vue.js, made a better Model and Controller structure, etc.
Should the new version be 1.0 or 3.0
You should make it 3.0
As it is the same project you've been working on and made improvements in.
As maybe your question or confusion is arising from the fact that you've made a complete re-write. But with projects, it usually happens. A complete re-write is usually marked with a version bump.
If the project, however, changes and caters something else than you begin with.
That project would be named differently and have 1.0 as the version.

joomla 3 vs 2.5 extension development differences

I am joomla user and I have created some extensions's and templates for joomla 2.5, but now I upgraded to joomla 3 because of bootstrap framework and responsive templates. I need your help here:
How to update joomla 2.5 extension to work with joomla 3 and be responsive?
I googled for a wile and couldn't find any answer about "extensions".
It's a big question, but here are some baseline steps.
First, make sure that your 2.5 code is clean. That is if you are still using any classes that were deprecated in 2.5 first go ahead and update them in your 2.5 version or else do that first in your 3 version. If you aren't logging deprecated classes you should do so to make sure you don't miss any. In particular you want to get rid of JRequest and look for any methods you might have extended that themselves extended JObject and make sure you are not relying on those methods. Also, you need to make sure you have changed any extends JModel to extends JModelLegacy (and similar for JView and JController). Depending on the complexity of your outputs you can likely follow the core code as a model for your administrator layouts. For the front endin my experience you are mainly just changing layout files to use the newer classes and ids.
If you use the Component Creator to develop your component framework you can specify if you want to build Joomla 2.5 or Joomla 3.0 compatible code.
Since 2.5 is the current LTS version until 3.5; the majority of the core changes are deprecated versus being completely removed. Meaning you can still use them and there are overall not many things required to migrate a 2.5 component, for now. I would definitely read through the walk through provided by Soren, but here are the three "major" required changes to get a 2.5 component working on 3.1 and above Joomla... with caveats of course! :D
1) Make sure all your view classes extend JViewLegacy
2) Make sure your primary controller extends JControllerLegacy instead of JController
3) Make sure your primary component entry point (my_component_name.php file in component root) use JControllerLegacy::getInstance('my_component_name') instead of JController::getInstance('my_component_name')

Upgrading custom iOS plugins from Cordoba 1.7 to 2.1, how can I find out why they are never loaded?

I've got my plugins converted, or so I think, and registered in Cordova.plist. The method signatures are correct, according to this guide. Nothing has changed on the js side, yet they don't load and just fail silently. Cordova itself is working, onDeviceReady is firing, but my plugins just never get executed. Everything worked fine with 1.7...
I'd like some help to get started on figuring out where they are supposed to be loaded and/or called from js on the obj-c side. Where can I set a breakpoint in the Cordova source to see why it's not executing my plugin?
Where should I begin to look?
I just did exactly this migration. All I can say is that it worked for me if you follow the steps. You also need to follow the steps from the 1.9>2.0 migration.
Since Cordova 2.0, the framework had big changes.
Maybe is better you implements again using the 2.0 rules and, after, only override selector signature. Thus you learn how do plugin in new versions, updating your Cordova skills. :)
Single big change between 2.0 and 2.1 (for plugins)
Support a new plugin method signature (old signature is deprecated):
The new signature is:
- (void) myMethod:(CDVInvokedUrlCommand*)command;
The old (deprecated) signature is:
- (void) myMethod:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;

How to preserve customization while upgrading to a new version of nopCommerce?

I'm working on NopCommerce 2.60 and I have extended Affiliate Module in NopCommerce 2.6 by adding two new fields like "WebsiteURL" and "Picture Upload".
For that I have made changes in Affiliate Services, Affiliate Controller, Affiliate.cs, Affiliate Map, Affiliate Model files. Now If I want to integrate these changes in upcoming versions of NopCommerce.
So What is better way to make changes in NopCommerce code and easily integrate in upcoming versions of NopCommerce?
There is no any way in nopcommerce to upgrade custom functionality in higher version. instead of that i would suggest right you function independent to nop means write separate classes for all Affiliate functionality, copy it in next version as you see in nopcommerce2.65 they have change some service, properties name.
I have recently looked into this since our company wanted to make sure nopCommerce could be upgraded at later dates if needed. The best solution we found was to make our modifications into plugins so that we could refrain from modifying the core as much as possible. Like Shivkumar said, it's not really possible to make nopCommerce upgrade proof.
Hope this helps.

Resources