ProjeQtOr free project management software - Custom screen - ProjeQtOr
 

Custom screen

More
10 Sep 2019 19:06 #1 by dep@eca.fr
Custom screen was created by dep@eca.fr
I just move to 8.1.6 version,
I need to do some custom field on opportunities,

and now I got error:
2019-09-10 19:02:07.160 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:07.160 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] Exception-[42S02] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'projeqtor_test.opportunitymain' doesn't exist
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] For query : select * from opportunitymain where id=83
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] Strack trace :
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] #0 Sql->query called at [/var/www/projeqtor/model/persistence/SqlElement.php:2931]
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] #1 SqlElement->getSqlElement called at [/var/www/projeqtor/model/persistence/SqlElement.php:669]
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] #2 SqlElement->__construct called at [/var/www/projeqtor/model/OpportunityMain.php:125]
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] #3 OpportunityMAin->__construct called at [/var/www/projeqtor/model/custom/Opportunity.php:192]
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] #4 Opportunity->setAttributes called at [/var/www/projeqtor/view/objectDetail.php:640]
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] #5 drawTableFromObject called at [/var/www/projeqtor/view/objectDetail.php:311]
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.504 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'id' for Class 'OpportunityMAin' : field 'id' not found in Database.
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'reference' for Class 'OpportunityMAin' : field 'reference' not found in Database.
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'name' for Class 'OpportunityMAin' : field 'name' not found in Database.
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'idOpportunityType' for Class 'OpportunityMAin' : field 'idOpportunityType' not found in Database.
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.505 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'idProject' for Class 'OpportunityMAin' : field 'idProject' not found in Database.
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'creationDate' for Class 'OpportunityMAin' : field 'creationDate' not found in Database.
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'idUser' for Class 'OpportunityMAin' : field 'idUser' not found in Database.
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.506 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'idSeverity' for Class 'OpportunityMAin' : field 'idSeverity' not found in Database.
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'idLikelihood' for Class 'OpportunityMAin' : field 'idLikelihood' not found in Database.
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'idCriticality' for Class 'OpportunityMAin' : field 'idCriticality' not found in Database.
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'impactCost' for Class 'OpportunityMAin' : field 'impactCost' not found in Database.
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.507 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.508 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.508 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2991)
2019-09-10 19:02:59.508 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given
2019-09-10 19:02:59.508 ***** ERROR ***** [V8.1.6] Error on SqlElement to get 'projectReserveAmount' for Class 'OpportunityMAin' : field 'projectReserveAmount' not found in Database.
2019-09-10 19:02:59.508 ***** ERROR ***** [V8.1.6] ERROR *****
2019-09-10 19:02:59.508 ***** ERROR ***** [V8.1.6] on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (2989)
2019-09-10 19:02:59.508 ***** ERROR ***** [V8.1.6] cause = array_key_exists() expects parameter 2 to be array, boolean given

Please Connexion or Create an account to join the conversation.

More
11 Sep 2019 09:10 #2 by dep@eca.fr
Replied by dep@eca.fr on topic Custom screen
the table name of opportunities is change... look:

2019-09-11 08:58:16.810 ***** ERROR ***** [V8.1.6] Exception-[42S02] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'projeqtor_test.opportunitymain' doesn't exist

Please Connexion or Create an account to join the conversation.

More
11 Sep 2019 09:19 #3 by babynus
Replied by babynus on topic Custom screen
No, we did not change anythiong on opportunities.
I tried and add custom filed withoput issue.

Try and remove customization on opportuinity.
Then do it again.
It issue persists, please post here file /model/custom/Opportunity.php

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
11 Sep 2019 09:33 #4 by dep@eca.fr
Replied by dep@eca.fr on topic Custom screen
<?php
/*** COPYRIGHT NOTICE *********************************************************
*
* Copyright 2009-2017 ProjeQtOr - Pascal BERNARD - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.
* Contributors : -
*
* This file is part of ProjeQtOr.
*
* ProjeQtOr is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* ProjeQtOr is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU Affero General Public License along with
* ProjeQtOr. If not, see < www.gnu.org/licenses/ >.
*
* You can get complete code of ProjeQtOr, other resource, help and information
* about contributors at www.projeqtor.org
*
*** DO NOT REMOVE THIS NOTICE ************************************************/

/** ============================================================================
* Opportunity.
*/
require_once('_securityCheck.php');
class Opportunity extends OpportunityMain {

public $_sec_description;
public $id;
public $reference;
public $produit;
public $name;
public $idOpportunityType;
public $idProject;
public $creationDate;
public $idUser;
public $idSeverity;
public $idLikelihood;
public $idCriticality;
public $impactCost;
public $projectReserveAmount;
public $Origin;
public $cause;
public $impact;
public $description;
public $_sec_treatment;
public $idStatus;
public $idResource;
public $idPriority;
public $initialEndDate;
public $actualEndDate;
public $handled;
public $handledDate;
public $done;
public $doneDate;
public $idle;
public $idleDate;
public $cancelled;
public $_lib_cancelled;
public $result;
public $_sec_Link;
public $_nbColMax=3;

public static $_customFields=array(
'produit'
);

private static $_fieldsAttributes=array(
"id"=>"nobr",
"reference"=>"readonly",
"name"=>"required",
"idProject"=>"required",
"idStatus"=>"required",
"idOpportunityType"=>"required",
"creationDate"=>"required",
"handled"=>"nobr",
"done"=>"nobr",
"idle"=>"nobr",
"idleDate"=>"nobr",
"cancelled"=>"nobr",
"projectReserveAmount"=>"readonly",
"produit"=>""
);




private static $_staticDisplayStyling=array(
);


private static $_colCaptionTransposition=array(
"produit"=>"plgProduit"
);


public static $_defaultValues=array(
);

/** ==========================================================================
* Constructor
* @param $id the id of the object in the database (null if not stored yet)
* @return void
*/
function __construct($id = NULL, $withoutDependentObjects=false) {
parent::__construct($id,$withoutDependentObjects);
}

/** ==========================================================================
* Destructor
* @return void
*/
function __destruct() {
parent::__destruct();
}



/** ==========================================================================
* Return the specific fieldsAttributes
* @return the fieldsAttributes
*/
protected function getStaticFieldsAttributes() {
return array_merge(parent::getStaticFieldsAttributes(),self::$_fieldsAttributes);
}

/** ==========================================================================
* Return the specific styling for fields
* @return the fields styling
*/
public function getStaticDisplayStyling() {
return self::$_staticDisplayStyling;
}

/** ============================================================================
* Set attribut from parent : merge current attributes with those of Main class
* @return void
*/
public function setAttributes() {
$parentClass=get_class($this)."Main";
if (!SqlElement::class_exists($parentClass)) return;
$parent=new $parentClass($this->id);
if (! method_exists($parent, "setAttributes")) return;
$parent->setAttributes();
if (method_exists("SqlElement","mergeAttributesArrays")) {
self::$_fieldsAttributes=SqlElement::mergeAttributesArrays(self::$_fieldsAttributes,$parent->getStaticFieldsAttributes());
} else {
self::$_fieldsAttributes=array_merge_preserve_keys(self::$_fieldsAttributes,$parent->getStaticFieldsAttributes());
}
} /** ============================================================================
* Return the specific colCaptionTransposition
* @return the colCaptionTransposition
*/
protected function getStaticColCaptionTransposition($fld=null) {
if (isset(self::$_colCaptionTransposition)) {
return array_merge(parent::getStaticColCaptionTransposition($fld),self::$_colCaptionTransposition);
} else {
return parent::getStaticColCaptionTransposition($fld);
}
}

/** ==========================================================================
* Return the generic defaultValues
* @return the layout
*/
protected function getStaticDefaultValues() {
return self::$_defaultValues;
}
}
?>

Please Connexion or Create an account to join the conversation.

More
11 Sep 2019 10:01 #5 by babynus
Replied by babynus on topic Custom screen
Please attaxch file (copy is hard to compare with expected)

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
11 Sep 2019 10:03 #6 by dep@eca.fr
Replied by dep@eca.fr on topic Custom screen
I cannot send *.php files on this forum

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.089 seconds