PHP, Short Articles

Magazon WordPress Theme Error

Yo!, what’s up?

I’ll post this here in order to (hopefully) save someone some time:

If you happen to be using a WordPress theme called Magazon (even the latest versions), you probably found out that it’s broken. The issue gets worst as in latest version of WordPress it is not evident what the problem is because WordPress suppresses the error messages.

Add the following at the end of your wp-config.php file in order to know what the issue is:

define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Enable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'display_errors', 1 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

This will allow the error messages to be written at [path-to-your-PW]/wp-content/debug.log file. If the error messages contained in that file are the following, keep reading in order to know how to fix them:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; STFlickrWidget has a deprecated constructor in [path-to-your-PW]/wp-content/themes/magazon/st-framework/lib/widgets/flickr.php on line 9

For the first case, open the flickr.php file and in line 9, replace this:

function STFlickrWidget() {

with this:

public function __construct() {

Fatal error: Redefinition of parameter $options in [path-to-your-PW]/wp-content/themes/magazon/st-framework/importer/radium-importer.php on line 277

In this case, open the radium-importer.php file on line 277, and perform the following changes:

public function process_imports( $content = true, $options = true, $options = true, $widgets = true) {

for this:

public function process_imports( $content = true, $options = true, $widgets = true) {

And finally, open the [path-to-your-PW]/wp-content/themes/magazon/st-framework/settings/shortcode.php file and replace the following in line 106:

$page_num = $paged = intval($_REQUEST['paged']);

with this:

$page_num = $paged = (array_key_exists('paged', $_REQUEST)) ? intval($_REQUEST['paged']) : 1;

And that’s it. That should be enough to have you back on track again.

This theme was last updated in 2016, and it seems this problem has been around since then. This might also mean that there will be no further updates, which is not necessarily a bad thing until future versions of WP break something.

Leave a comment and let me know if these changes were helpful for you.

Tagged , , , ,

2 thoughts on “Magazon WordPress Theme Error

  1. I’m so glad you posted this and I found it. Editing the radium-importer.php file on line 277 as you stated fixed the problem!

    1. Thanks, Perry. I’m glad I was able to help and save some time.

      You might also want to check if the Theme is performing well on mobile devices, as the last time I checked (like a day or two ago) it wasn’t. It may be something for my particular site only, but if not, I’ll be posting notes here too after fixing it.

      Regards,

Leave a Reply

Your email address will not be published. Required fields are marked *