Hi @thepubcl,
The widgets function need a __construct instead of the functions name.
Below an example of how it probably looks like
function social_media_widget() {
parent::__construct(false, $name = 'Social Media Widget' );
}
Change to something like this
function __construct() {
parent::__construct(false, $name = 'Social Media Widget' );
}
Let us know if this has solved your issue.
Thanks, helldog2018
this is what I found:
function sgwindow_SocialIcons() {
/* Widget settings. */
$widget_ops = array(
‘classname’ => ‘sgwindow_socialicons’,
‘description’ => __(‘Display Social Media Links.’, ‘sg-window’ ));
/* Widget control settings. */
$control_ops = array(
‘width’ => 250,
‘height’ => 250,
‘id_base’ => ‘sgwindow_socialicons_widget’);
/* Create the widget. */
parent::__construct( ‘sgwindow_socialicons_widget’, __(‘SG Social Media Icons’, ‘sg-window’ ), $widget_ops, $control_ops );
Maybe it’s obvious, but again… amateur, so?
Hi there,
try editing the code to:
function __construct() {
/* Widget settings. */
$widget_ops = array(
‘classname’ => ‘sgwindow_socialicons’,
‘description’ => __(‘Display Social Media Links.’, ‘sg-window’ ));
/* Widget control settings. */
$control_ops = array(
‘width’ => 250,
‘height’ => 250,
‘id_base’ => ‘sgwindow_socialicons_widget’);
/* Create the widget. */
parent::__construct( ‘sgwindow_socialicons_widget’, __(‘SG Social Media Icons’, ‘sg-window’ ), $widget_ops, $control_ops );
Thanks, helldog 2018,
That did it! Now I just have to get Mailpoet to support v2 and fix their comparability issues. Then I’m good to go!
Your welcome, happy that it solved your issue regarding the widget.
I have no idea what the compatibility issues are with Mailpoet, but if you have an error report, I am happy to take a look.
Wow, thanks, this is what I have:
754 | WARNING | Function dl() is deprecated since PHP 5.3
754 | WARNING | Function dl() is deprecated since PHP 5.3
852 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
————————————————————————————————–
——————————————————————————————————————————————————————–
FILE: /home/thepubcl/public_html/wp-content/plugins/wysija-newsletters/helpers/bounce.php
—————————————————————————————–
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
—————————————————————————————–
63 | WARNING | Function dl() is deprecated since PHP 5.3
Hi,
This is probably the same issue as the other widget, can you show me what is inside public_html/wp-content/plugins/wysija-newsletters/helpers/bounce.php?
Sorry, the first section was under:
FILE: /home/thepubcl/public_html/wp-content/plugins/wysija-newsletters/inc/pear/pear.php
Looking for other
You can show them both svp.
Both files have same issue: Function dl()
This is 55-66 in bounce file
if (function_exists(‘dl’)) {
//We will try to load it on the fly
$fatalMessage = ‘The system tried to load dynamically the ‘ . $EXTENSION . ‘ extension’;
$fatalMessage .= ‘<br/>If you see this message, that means the system could not load this PHP extension’;
$fatalMessage .= ‘<br/>Please enable the PHP Extension ‘ . $EXTENSION;
ob_start();
echo $fatalMessage;
//This method could cause a fatal error, but we will still display some messages in that case.
dl($EXTENSION);
$warnings = str_replace($fatalMessage, ”, ob_get_clean());
if (extension_loaded(‘imap’) OR function_exists(‘imap_open’))
return true;
Sorry thought I was in the other file. That is correct for Bounce file
736-756
function loadExtension($ext)
{
if (!extension_loaded($ext)) {
// if either returns true dl() will produce a FATAL error, stop that
if ((ini_get(‘enable_dl’) != 1) || (ini_get(‘safe_mode’) == 1)) {
return false;
}
if (OS_WINDOWS) {
$suffix = ‘.dll’;
} elseif (PHP_OS == ‘HP-UX’) {
$suffix = ‘.sl’;
} elseif (PHP_OS == ‘AIX’) {
$suffix = ‘.a’;
} elseif (PHP_OS == ‘OSX’) {
$suffix = ‘.bundle’;
} else {
$suffix = ‘.so’;
}
return @dl(‘php_’.$ext.$suffix) || @dl($ext.$suffix);
}
return true;
and 852-853
function PEAR_Error($message = ‘unknown error’, $code = null,
$mode = null, $options = null, $userinfo = null)
These are warnings, not errors, so you don’t really need to do anything. The code will work as it stands.
Meantime, post a question in those plugins’ support forums.
Thanks Steve,
I did post to Mailpoet, so far their answer was similar to yours, that it shouldn’t be a problem. Unfortunately it is. SG Optimizer runs the compatibility test and doesn’t let you go to the update step until conflicts are resolved.
Then Helldog2018 was very nice to help fix the issue I posted here and then was even nicer to offer to take a look at the Mailpoet issue I was having. So I took them up on the offer.
So, I’m guessing you were not having a problem with that, you were just suggesting Mailpoet might be of more help? Anyway, if I can’t get these resolved, all I can think to do is delete Mailpoet plugin (which opens a different list of issues) to allow me to move on with PHP 7 update . This is why (as an amateur) I was happy to have Helldog2018’s offer.