I’ve seen the following error occur un our error logbook of some sites.
E_WARNING: Undefined array key [NUMBER] at /PATH_TO_WP_PLUGINS/mailplus-forms/admin/classes/Setting.class.php in Spotler\Admin\Setting::apiConnectionSection line 124
This is caused because it loops 50 times to register api settings fields, however those indexes don’t always exist on the result of the $this->getSettings(‘name’) function.
To resolve the issue, you can do the following. Change the line below
'name' => $this->getSettings('name')[$i],
to
'name' => $this->getSettings('name')[$i] ?? '',
Please note that this suggestion only works for PHP 7.0+. If you need even more backward compatibility, you can also do this:
// Before the for loop (makes sure to only get name settings once)
$name_setting = $this->getSettings('name');
// And then later'name' => !empty($name_setting[$i]) ? $name_setting[$i] : '';
The change should be quite small, but prevent a lot of warnings as it triggers 50 times on every wp-admin pageload.
If there are any questions remaining, please feel free to ask.
Kind regards,
Menno
Plugin version : 1.3.0
Error:SimpleXMLElement::addChild(): unterminated entity reference opinie
Location: /data/www/www.taskforcediversiteit.nl/releases/8/htdocs/wp-content/plugins/mailplus-forms/general/classes/Api.class.php:201
Code:
????????????if?(?is_array(?$value?)?)?{
????????????????foreach?(?$value?as?$currentVal?)?{
????????????????????$value_xml->addChild(?"item",?$currentVal?); // Error
????????????????}
????????????}?else?{
????????????????$value_xml->item?=?$repairedData[?$key?];
????????????}
We just tried to implement a new form; when loading the page, the web browser scrolls straight to the form – almost like it has an anchor link.
How do I stop this? I have had issues with the whole of development of this page and this is last straw!
]]>The problem I am experiencing is that the plugin is automatically scrolling to the form upon page load. Another concern is that a certain timeout triggers a piece of code execution that results in significant website stuttering. Your attention to this issue would be greatly appreciated.
]]>Hi,
I’ve found a typo that might cause a breaking error (I couldn’t find a git repo so figured I’d post it here):
In Api.class.php on line 82:
throw new Exception( 'Something went wrong while retrieving the Spotler forms.', 'mailplus-forms' );
This will cause the following error:
Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]])
so it should be:
throw new Exception( 'Something went wrong while retrieving the Spotler forms.' );
The string translation happens in the catch block so you shouldn’t add the domain as an argument here.
Please change this in the next update.
]]>Hi there,
Just trying out your plugin to check if our client can migrate from Pardot to Spotler. I activated the REST API in our Spotler account settings and generated an Authentication key & Authentication secret with the External id field dropdown set to External id (only option available).
In the MailPlus Forms Plugin Settings I filled in my Authentication key in Consumer key and Authentication secret in Consumer secret and left the MailPlus API URL to the default: https://restapi.mailplus.nl value, is that correct?
Saving this setting is successful, however in the WYSIWYG editor the Add MailPlus form dropdown stays empty, even after creating a test form in Spotler.
My php logs doesn’t show any errors.
Not sure what I’m doing wrong?
When I test my key & secret in the Interactive API Documentation to get the form list, it does return all my forms correctly?
I noticed that the api url is different though:
/integrationservice-1.1.0/form/list
instead of:
/integrationservice/form/list
p.s. I’m also using Root’s Bedrock
Any thoughts?
Thanks!
The translations of this plugin seem broken. All I see are strings like {#mpforms_dlg.selectform}. Is there anything I can do to fix this?
]]>Hi,
I got the following error on our website:
Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in /wp-content/plugins/mailplus-forms/Zend/Validate/Hostname.php on line 553
Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in /wp-content/plugins/mailplus-forms/Zend/Validate/Hostname.php on line 649
I found the following solution which seems to be working:
Replace line 553 with:
if (function_exists('iconv') && PHP_VERSION_ID < 50600)
{
// These are settings that can be set inside code
iconv_set_encoding("internal_encoding", "UTF-8");
}
elseif (PHP_VERSION_ID >= 50600)
{
ini_set("default_charset", "UTF-8");
}
Replace line 649 with:
if (function_exists('iconv') && PHP_VERSION_ID < 50600)
{
// These are settings that can be set inside code
iconv_set_encoding("internal_encoding", $origenc);
}
elseif (PHP_VERSION_ID >= 50600)
{
ini_set("default_charset", $origenc);
}
]]>
So I’ve added my key and secret in the plugin options page, but when creating a page I am not able to add a form with the editor. My apache error log shows the following error:
PHP Fatal error: require_once(): Failed opening required ‘../../../../wp-load.php’ (include_path=’.:’) in xxxx/xxxx/xxxx/plugins/mailplus-forms/tinymce/editor_plugin.js.php on line 3
So if I’m understanding it correctly the plugin assumes the wp-load.php is located 4 folders down the directory structure, but that is not always the case with every WordPress installation.
Is there a chance you guys can fix this?
]]>