• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Basic Form Submission returns Internal Error

JaXnPriVate

New Pleskian
Server operating system version
Ubuntu
Plesk version and microupdate number
18.0.49
I implemented a simple Form (Copy and Pasted it from both Documentation Pages),

but both returned an Internal Error for me.

Do I have to give my method a certain name?

1678030045530.png

PHP:
public function formAction(){
$this->registerTabs();
$formIO = DomainHandler::createAddForm();

// Assign Form to View.
$this->view->settings = $formIO;

// Check for Form Submit.
if ($this->getRequest()->isPost()) {

// Proccess/save value here

$this->_status->addInfo('Data was successfully saved.');
//$this->_helper->json(['redirect' => pm_Context::getBaseUrl()]);
}
}
 
We need a little more context. Can you post the link to the documentation where you found the code?
 
instantiation
Do you mean "Initialization" ? When you mean OOP, i not extended my Form as Form Simple.

I will not use the extended Class before it not works.


Following Code i used to build the Form Object:

PHP:
/** * Create new Form for Add DynDNS Domain.
* @return void
*
* // Domain
* // Username || Password
* // Type (IPv4 || IPv6 || Both)...
*/
public function createAddForm()
{
// Create new Zend Form.
$formIO = new pm_Form_Simple();

// Get Domains for Customer via ID.
$domainsIO = self::getDomains(pm_Session::getClient()->getId());

// Add Sub-Domain Field.
$formIO->addElement("text", "ddns-subdomain", [
"label" => "Subdomain",
"value" => "DynDNS",
'class' => 'f-middle-size',
'validators' => [
['StringLength', true, [0, 255]],
],
"required" => true
]);

// Add Description for Sub-Domain.
$formIO->addElement('description', 'ddns-wildcard', [
"description" => "Sie müssen nicht zwingend eine Subdomain verwenden, nutzen sie <b>'@' um ein Wildcard</b> Record für DynDNS zu erstellen.",
"escape" => false
]);

// Check if Domains Array not empty.
if (sizeof($domainsIO) != 0) {
// Add Domain Selector.
$formIO->addElement("select", "ddns-domain", [
"label" => "Domain",
"multiOptions" => $domainsIO,
"required" => true
]);
}

// Add Type Selector.
$formIO->addElement("select", "ddns-type", [
"label" => "Domain",
"multiOptions" => [
"IPv4 Adresse", "IPv6 Adresse", "IPv4- und IPv6 Adresse", "IPv4 Adresse und IPv6 Präfix", "IPv6 Präfix"
],
"required" => true
]);


// Add Description TextArea.
$formIO->addElement("textarea", "ddns-description", [
"label" => "Beschreibung",
"value" => "Platzhalter Beschreibung",
"rows" => "4",
'class' => 'f-middle-size',
'validators' => [
['StringLength', true, [0, 255]],
],
"required" => false
]);

// Add Form Actions.
$formIO->addControlButtons([
"cancelLink" => pm_Context::getActionUrl("index", "overview")
]);

return $formIO;
}
 
Is there any other Error Log for Plesk Zend Framework?

/var/log/plesk/panel.log <-- Does not print anything when i submit the Form.
 
I found the bug, it's because of the hyphens in the names of the objects / DOM elements.

Plesk deletes them, but apparently not from the backend, where they remain.

If I write everything without hyphens, it goes 1A, I find kind of stupid but is so.

I do not know if this is a known issue,
there was nothing in the docs and the error log was also not meaningful.
 
Back
Top