Temporary fixes for problems in other extensions/plugins

In most cases errors are coming from other than our codes, but it might take some time for them to help you out, so here are some common errors, and solutions to make your website’s code not to stop at their errors. Always make a backup from the original file, if you are not sure about your coding, a wrong php code could cause a blank page, and a wrong javascript code could mess up the layout. Also errors are usually coming because of deeper mistakes in the code, somethings are causing them, and they should be fixed, not only skipped, that is why these should be only temporary fixes.

– Warning: Cannot modify header information – headers already sent by (output started at xy.php:1) in /libraries/nextend/smartslider/admin/controllers/sliders.php on line 414

Headers are in the beginning of the files. These are defining, what kind of file is used, php file, html file, image, etc..

Possible errors:

Not visible characters before the <?php

You can know, if this is the case, that the error is pointing to the first line, as in my example: (output started at xy.php:1). You should rewrite that part, and save on your file. Probably it will disappear.

Not visible characters after the ?>

This error is pointing behind the ?> part. Same solution, as the previous one, rewrite the ending, and make sure, that there isn’t any space after it.

UTF-8 Byte Order Mark

Download a code editor program, for example NotePad++, in which you can select how to encode your text, and choose UTF-8 without BOM.

encode

Problem with the code

There are many functions, that could affect the header information, and they are hard to find, and to figure out, why did they do that, so you should leave this to the code developer instead.

In Joomla you could try to go to the Extensions -> Plugin Manager, filter out the system plugins, and move the Nextend Library into the first position in the list.

– Javascript error: xy is not defined

This error means, that a variable is used, but it wasn’t even defined. It could be, that just something is missing from the backend configuration of this program, so you should check that first, and if it won’t help, you can check if that variable is defined, then continue to that codepart:

if(typeof xy !='undefined'){
/*do the code...*/
}

– Javascript error: xy is not a function

Probably some javascript file is missing, or the loading order is wrong, maybe it was skipped by a mistake. You can check it with this:

if(typeof xy =='function'){ 
    xy();
}

– jQuery error: jQuery(…).xy is not a function

Same as the previous one, just for jQuery function checking:

if( jQuery.isFunction(jQuery.fn.xy)){
    /*do the code*/
}

– Javascript error: anything

Some javascript codes could be compressed into a few lines without formatting. In this case you could search for javascript code formatter in google, or just check, if the whole code works or not, and skip it if it doesn’t.

try{
/* whole code */
}catch(e){    
}