• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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