This time I will tell you more about the most common problems in your APEX applications after an upgrade to APEX 5.

You will find the most migration bugs in following situations:

Custom Code

Newer jQuery implementations

APEX plugins

Own Javascript code

Old schema references

Changed APEX standard components

Interactive Report

Items

jQuery / jQuery UI versions

1. Custom Code

1.1 jQuery implementations
One of the biggest problems, I experienced, had to do with wrongly integrated jQuery libraries. Because they are now outdated but still loaded after the newer versions delivered by APEX 5 means they will lead to some ugly javascript errors. They can look different depending on which jQuery library part you use. I will show you two examples of them:

e.widget.extend is not a function

a.element.propAttr is not a funtion

Luckily it is easy to fix. All you need to do is to delete the old linked jQuery files.
BTW: This error mostly appears in templates or plugins.

Template example

Plugin Example

To find this issue just search your APEX application for integrated libraries and check if they are necessary anylonger.

Example search string: jquery-ui/1.8

Unfortunately those implementations can be found everywhere in your application:

template

page

region

plugin

or even dynamic PL/SQL code :)

1.2 Plugins
Using APEX plugins can be a real pain in the ass, when they don´t work. :)

Example of my own plugin "UILayout for APEX"

But what can you do when errors occur?

search for a new version of the plugin

check the Internet for the error you experience

check the plugin for JS libraries and try to find an update for them

try to fix it yourself :). Would be good for you to get to know how the plugin works.

1.3 Own Javascript code
The good news is that I can't remember on custom JS code which stopped working by the new jQuery versions. But be careful, code from the early APEX 3 versions may not work in future APEX versions anymore. For that check the deprecated feature list.

1.4 Old schema references
If you are an APEX developer using undocumented tables, views or functions from your current APEX schema which are by the way not supported and can be changed in each release. Be aware to search for those objects.

You may have granted access to those objects by using synonyms. Check those as well.

2. Changed APEX standard features2.1 Interactive Report (IR)
The interactive report (IR) got some of the biggest changes made in APEX 5 leading to a couple of issues you will have to deal with.

Why?
The IR got the biggest upgrade since the initial development. Joel Kallman wrote in his blog about it:
„...In the rewrite of Interactive Reports, the IR component was completely revamped from top to bottom...“

Whats new and why does it effect your applications?
In APEX 5 you are able to have several IR on one page. This master change included a complete update of all JS (gReport), HTML and CSS components. On top of this came a new CSS design and a pivot functionality.

What will happen?
- Custom CSS and JS code will not work anymore
- Most APEX plugins will fail, only the printing plugins may still work
- IR will look different to the one you had in APEX 4.2

Example 1: gReport-issue:
In APEX 4.2 and before you could use the function call "gReport.search('SEARCH');" to update the IR during the runtime.

In APEX 5 you will need to create a dynamic action (code example by Jeff Eberhard) to refresh the IR. The following image shows how to call the dynamic action.

Example 2: Design changes
The appearance of the IR in APEX 5 changed to a more modern view. Important for you is the fact that you can't switch back to the old view.

IR in APEX 4.2

IR in APEX 5.0

Tip: If you use several applications with the same theme and you experience CSS issues. Just create a CSS fix file (including all CSS changes for IR or jQuery UI elements) which you could implement in all of your applications.

2.2 Items
Not only the IR has changed it´s appearance. Items like date picker or rich text editor changed their visual appearance as well.

What does it mean to you?
- You may have to update your end user documentation
- You may need to make an application training about new IR features and visual changes for your end users

This could mean that some of your JS code snippets will not work like they did before.
IMHO: As I told before I myself had almost no problems with custom JS code in the applications I migrated.

Summary
Most of your application problems will happen when...
- you use old jQuery versions or plugins
- you use special Interactive Report extensions

IMHO: Errors will probably occur but they often repeat themselves within your applications and are easy to fix. Means you will not have 50 different errors. It is more likely that you will have 5 problems repeating themselves on 10 different applications.

Whats next?
In my next and last part of this post series of the APEX 5 migration I will write about the Universal Theme Upgrade. This is the part everyone wants to work with and here you will meet the real deal . :)