Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with dolibarr v20.0.2 and 5.0.2 #261

Open
funsurfer2008 opened this issue Oct 9, 2024 · 9 comments
Open

error with dolibarr v20.0.2 and 5.0.2 #261

funsurfer2008 opened this issue Oct 9, 2024 · 9 comments

Comments

@funsurfer2008
Copy link

If i want to create a Task or edit a existing one i'll get the following Error:

Error in request SELECT rowid as rowid, ref, label FROM llx_product AND Filter error - Bad syntax of the search string ORDER BY ref, label You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND Filter error - Bad syntax of the search string ORDER BY ref, label' at line 1. Check setup of extra parameters.

also there is an error with the "includeMain.lib.php"

this should be right:
// Define status

$res = 0;
error_reporting(E_ALL);
$currentTimesheetPath = dirname(FILE);
if (! $res && file_exists($currentTimesheetPath."/dev.inc.php")) {
include $currentTimesheetPath.'/dev.inc.php';
}
//if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
if (! $res && file_exists($currentTimesheetPath."/../../../main.inc.php")) {
$res = @include $currentTimesheetPath.'/../../../main.inc.php';// in HTdocs
//$_SERVER["CONTEXT_DOCUMENT_ROOT"] = realpath($currentTimesheetPath."/../../../");
}
if (! $res && file_exists($currentTimesheetPath."/../../../../main.inc.php")) {
$res = @include $currentTimesheetPath.'/../../../../main.inc.php';//in custom
//$_SERVER["CONTEXT_DOCUMENT_ROOT"] = realpath($currentTimesheetPath."/../../../../");
}
if (! $res && file_exists($currentTimesheetPath."/../../../../../main.inc.php")) {
$res = @include $currentTimesheetPath.'/../../../../../main.inc.php';//in custom
//$_SERVER["CONTEXT_DOCUMENT_ROOT"] = realpath($currentTimesheetPath."/../../");
}
if (! $res) die("Include of main fails") ;

if ($user->admin && version_compare("4.3.10", $conf->global->TIMESHEET_VERSION) > 0){
setEventMessage("Version of timesheet updated, please deactivate then reactivate the module", 'warnings');
}
// return from functions
define("BADPARAM",-2);
define("OK",1);
define("NOK",-1);
define("NOTCREATED",-3);
define("NOTUPDATED",-4);
define("CHILDNOTCREATED",-5);

@funsurfer2008
Copy link
Author

@tronx2100 maybe you have an short fix.

brgds

@tronx2100
Copy link
Collaborator

tronx2100 commented Oct 10, 2024

so what i know this is a BUG in dolibarr because there is a BUG in extrafields. Which wrong interpret the sql request. Also when i change the sql syntax the error occours everytime. should be related to this. Dolibarr/dolibarr#31028 . The error is related to the extraoptions fields in dolibarr which have sql connection in user and so... when you remove the extrafield the error is gone for now , the shortest fix ...

@funsurfer2008
Copy link
Author

Hy, did not work even in 20.0.2. we need this field in User and Projects. do you know when it will be fixed?

brgds

@funsurfer2008 funsurfer2008 changed the title error with dolibarr v20.0.1 and 5.0.2 error with dolibarr v20.0.2 and 5.0.2 Nov 13, 2024
@funsurfer2008
Copy link
Author

i cahnged the filter from: product:ref|label:rowid::tosell='1' AND fk_product_type='1' to product:ref|label:rowid::(tosell:=:1 AND fk_product_type:=:1)
now it work. but is this the final fix? brgds

@tronx2100
Copy link
Collaborator

tronx2100 commented Nov 13, 2024 via email

@tronx2100
Copy link
Collaborator

this was first occoured with 20.0.0 update

@tronx2100
Copy link
Collaborator

module_timesheet-4.6.7.zip
ich have updated the modtimesheet.class.php in folder core/modules. this is my module release im not the maintainer from this module. but it seems to work now. please disable the module and re-enable aber update the module or the file .

@funsurfer2008
Copy link
Author

funsurfer2008 commented Jan 2, 2025

module_timesheet-4.6.7.zip ich have updated the modtimesheet.class.php in folder core/modules. this is my module release im not the maintainer from this module. but it seems to work now. please disable the module and re-enable aber update the module or the file .

This is great! Big thanks from me here!
only filechange was not working. i have installed your version completly!

@tronx2100
Copy link
Collaborator

module_timesheet-4.6.7.zip ich have updated the modtimesheet.class.php in folder core/modules. this is my module release im not the maintainer from this module. but it seems to work now. please disable the module and re-enable aber update the module or the file .

This is great! Big thanks from me here! only filechange was not working. i have installed your version completly!

and this works ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants