Cannot change pricing for new product

Today I added a new product. I filled in the description and all necessary information Saved it and then get to the tab to change the sale price. I give in the new price and click on save and then I get a server 500 code? What is wrong? The page on the server is existing. price.php.

1 Like

Hi @orjo ,

For an error code 500, you have to go to hte apache log on your server to find the root cause and address it. For more precise help, please give your dolibarr version, your installation (php, server, …) and if you have any other external modules

1 Like

which dolibarr version are you running @orjo

1 Like

Same problem dolibarr 23.02, maybe a bug

okay @Mendiaco I’d like to see your webservers log when trying to change the pricing

2026-04-21 08:59:22 DEBUG ::1 3171 504 - This is an already logged session. _SESSION[‘dol_login’]=jmirom _SESSION[‘dol_entity’]=1
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.civility as civility_code, u.birth, u.job, u.email, u.email_oauth2, u.personal_email, u.socialnetworks, u.signature, u.office_phone, u.office_fax, u.user_mobile, u.personal_mobile, u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id, u.admin, u.login, u.note_private, u.note_public, u.pass, u.pass_crypted, u.pass_temp, u.api_key, u.fk_soc, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid, u.fk_user_expense_validator, u.fk_user_holiday_validator, fk_user_creat as user_creation_id, fk_user_modif as user_modification_id, u.statut as status, u.lang, u.entity, u.datec as datec, GREATEST(u.tms, uef.tms) as datem, u.datelastlogin as datel, u.datepreviouslogin as datep, u.flagdelsessionsbefore, u.iplastlogin, u.ippreviouslogin, u.datelastpassvalidation, u.datestartvalidity, u.dateendvalidity, u.photo as photo, u.openid as openid, u.accountancy_code_user_general, u.accountancy_code, u.thm, u.tjm, u.salary, u.salaryextra, u.weeklyhours, u.color, u.dateemployment, u.dateemploymentend, u.fk_warehouse, u.ref_ext, u.default_range, u.default_c_exp_tax_cat, u.national_registration_number, u.ref_employee, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state, s.label as label_establishment, u.fk_establishment FROM llx_user as u LEFT JOIN llx_user_extrafields as uef ON uef.fk_object = u.rowid LEFT JOIN llx_c_country as c ON u.fk_country = c.rowid LEFT JOIN llx_c_departements as d ON u.fk_state = d.rowid LEFT JOIN llx_establishment as s ON u.fk_establishment = s.rowid WHERE u.entity IN (0, 1) AND u.login = ‘jmirom’ ORDER BY u.entity ASC
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT rowid, name, label, type, size, elementtype, fieldunique, fieldrequired, param, pos, alwayseditable, emptyonclone, perms, langs, list, printable, totalizable, fielddefault, fieldcomputed, entity, enabled, help, aiprompt, css, cssview, csslist FROM llx_extrafields WHERE elementtype = ‘user’ ORDER BY pos
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT param, value FROM llx_user_param WHERE fk_user = 1 AND entity = 1
2026-04-21 08:59:22 DEBUG ::1 3171 504 DefaultValues::fetchAll
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT rowid, type, user_id, page, param, value FROM llx_default_values as t WHERE 1 = 1 AND ((t.user_id IN (0,1)) AND (entity IN (0,1)))
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT DISTINCT r.module, r.perms, r.subperms FROM llx_user_rights as ur, llx_rights_def as r WHERE r.id = ur.fk_id AND r.entity = 1 AND ur.entity = 1 AND ur.fk_user = 1 AND r.perms IS NOT NULL AND r.perms NOT LIKE ‘%_advance’
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT DISTINCT r.module, r.perms, r.subperms, r.entity FROM llx_usergroup_rights as gr, llx_usergroup_user as gu, llx_rights_def as r WHERE r.id = gr.fk_id AND gr.entity = 1 AND gu.entity IN (0,1) AND r.entity = 1 AND gr.fk_usergroup = gu.fk_usergroup AND gu.fk_user = 1 AND r.perms IS NOT NULL AND r.perms NOT LIKE ‘%_advance’
2026-04-21 08:59:22 NOTICE ::1 3171 504 — Access to POST /dolibarr/product/price.php - action=update_price, massaction=
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT transkey, transvalue FROM llx_overwrite_trans where (lang=‘es_ES’ OR lang IS NULL) AND entity IN (0, 0,1) ORDER BY lang DESC
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT m.rowid, m.type, m.module, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.prefix, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu, m.position, m.showtopmenuinframe FROM llx_menu as m WHERE m.entity IN (0,1) AND m.menu_handler IN (‘eldy’,‘all’) AND m.usertype IN (0,2) ORDER BY m.type DESC, m.position, m.rowid
2026-04-21 08:59:22 INFO ::1 3171 504 Product::fetch id=3840 ref= ref_ext=
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT p.rowid, p.ref, p.ref_ext, p.label, p.description, p.url, p.note_public, p.note as note_private, p.customcode, p.fk_country, p.fk_state, p.lifetime, p.qc_frequency, p.price, p.price_ttc, p.price_min, p.price_min_ttc, p.price_base_type, p.cost_price, p.default_vat_code, p.tva_tx, p.recuperableonly as tva_npr, p.localtax1_tx, p.localtax2_tx, p.localtax1_type, p.localtax2_type, p.tosell, p.tobuy, p.fk_product_type, p.duration, p.fk_default_warehouse, p.fk_default_workstation, p.seuil_stock_alerte, p.canvas, p.net_measure, p.net_measure_units, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.last_main_doc, p.surface, p.surface_units, p.volume, p.volume_units, p.barcode, p.fk_barcode_type, p.finished, p.fk_default_bom, p.mandatory_period, p.packaging, p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.pmp, p.datec, GREATEST(p.tms, pef.tms) AS tms, p.import_key, p.entity, p.desiredstock, p.tobatch, p.sell_or_eat_by_mandatory, p.batch_mask, p.fk_unit, p.fk_price_expression, p.price_autogen, p.stockable_product, p.model_pdf, p.price_label, p.stock FROM llx_product as p LEFT JOIN llx_product_extrafields as pef ON pef.fk_object=p.rowid WHERE p.rowid = 3840
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT rowid, name, label, type, size, elementtype, fieldunique, fieldrequired, param, pos, alwayseditable, emptyonclone, perms, langs, list, printable, totalizable, fielddefault, fieldcomputed, entity, enabled, help, aiprompt, css, cssview, csslist FROM llx_extrafields WHERE elementtype = ‘product’ ORDER BY pos
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT rowid, trabajocliente FROM llx_product_extrafields WHERE fk_object = 3840
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT lang, label, description, note as other FROM llx_product_lang WHERE fk_product = 3840
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT COUNT(dbt.rowid) as nb FROM llx_product as dbt WHERE dbt.rowid IN (3840) AND dbt.entity IN (1)
2026-04-21 08:59:22 DEBUG ::1 3171 504 security.lib.php::checkUserAccessToObject::return True
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT t.rowid, t.code, t.recuperableonly, t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type FROM llx_c_tva as t, llx_c_country as c WHERE t.fk_pays = c.rowid AND c.code = ‘ES’ AND t.taux = 21 AND t.active = 1 AND t.code = ‘’
2026-04-21 08:59:22 DEBUG ::1 3171 504 BEGIN Transaction
2026-04-21 08:59:22 INFO ::1 3171 504 Product::update_price id=3840 newprice=38.5 newpricebase=HT newminprice=0 level=0 npr=0 newdefaultvatcode=
2026-04-21 08:59:22 DEBUG ::1 3171 504 Product::update_price
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=UPDATE llx_product SET price_base_type = ‘HT’, price = 38.5, price_ttc = 46.585, price_min = 0, price_min_ttc = 0, localtax1_tx = 0, localtax2_tx = 0, localtax1_type = ‘0’, localtax2_type = ‘0’, default_vat_code = null, price_label = null, tva_tx = 21, recuperableonly = ‘0’ WHERE rowid = 3840
2026-04-21 08:59:22 DEBUG ::1 3171 504 Product::_log_price
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=INSERT INTO llx_product_price(price_level,date_price, fk_product, fk_user_author, price_label, price, price_ttc, price_base_type,tosell, tva_tx, default_vat_code, recuperableonly, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, price_min,price_min_ttc,price_by_qty,entity,fk_price_expression) VALUES(1, ‘2026-04-21 08:59:22’, 3840, 1, null, 38.5, 46.585,‘HT’,1, 21, null, 0, 0, 0, ‘0’, ‘0’, 0, 0, 0, 1,null)
2026-04-21 08:59:22 DEBUG ::1 3171 504 sql=SELECT rowid, name, label, type, size, elementtype, fieldunique, fieldrequired, param, pos, alwayseditable, emptyonclone, perms, langs, list, printable, totalizable, fielddefault, fieldcomputed, entity, enabled, help, aiprompt, css, cssview, csslist FROM llx_extrafields WHERE elementtype = ‘product_price’ ORDER BY pos
2026-04-21 08:59:22 INFO ::1 3171 504 — End access to /dolibarr/product/price.php

#0 /Applications/MAMP/htdocs/dolibarr/product/price.php(569): Product->update(‘3840’, Object(User))
#1 {main}
thrown in /Applications/MAMP/htdocs/dolibarr/product/class/product.class.php on line 1504
[21-Apr-2026 09:51:11 UTC] PHP Fatal error: Uncaught Error: Call to undefined method stdClass::isEmpty() in /Applications/MAMP/htdocs/dolibarr/product/class/product.class.php:1504
Stack trace:
#0 /Applications/MAMP/htdocs/dolibarr/product/price.php(569): Product->update(‘3840’, Object(User))
#1 {main}
thrown in /Applications/MAMP/htdocs/dolibarr/product/class/product.class.php on line 1504
[21-Apr-2026 09:51:26 UTC] PHP Fatal error: Uncaught Error: Call to undefined method stdClass::isEmpty() in /Applications/MAMP/htdocs/dolibarr/product/class/product.class.php:1504
Stack trace:
#0 /Applications/MAMP/htdocs/dolibarr/product/price.php(569): Product->update(‘3840’, Object(User))
#1 {main}
thrown in /Applications/MAMP/htdocs/dolibarr/product/class/product.class.php on line 1504
[21-Apr-2026 10:13:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined method stdClass::isEmpty() in /Applications/MAMP/htdocs/dolibarr/product/class/product.class.php:1504
Stack trace:
#0 /Applications/MAMP/htdocs/dolibarr/product/price.php(569): Product->update(‘3840’, Object(User))
#1 {main}
thrown in /Applications/MAMP/htdocs/dolibarr/product/class/product.class.php on line 1504

Does your product 3840 use any extra fields ?

No standard fields and kits.

Your log says that it started to update prices but the transaction wasn’t fully completed. No clear indication why.
With ssh access I believe it could be solved within a few minutes.

Could be a custom hook conflict. Do you have any custom modules activated? Which one?
I guess it is caused by any third party module handling the object differently than dolibarr standard.

My modules:
Users and groups
Free days,Third parts
orders, contracts, subscriptions, suppliers, invoices and credit notes, taxes and special expenses, salaries, banks and cash registers, direct debit payments, double-entry accounting, products, services, product variants, bill of materials, production orders, events and calendar, resources, WYSIWYG editor, tags and categories, cross-module workflows, data import, data export, OAuth2 token management, one-click printing, logging, debugging, debug toolbar

No third part modules.

type or paste code here

please use this icon to paste your text using this icon </>

PHP Fatal error: Uncaught Error: Call to undefined method stdClass::isEmpty() in /Applications/MAMP/htdocs/dolibarr/product/class/product.class.php:1504

Any solution?

@Mendiaco I think I found out it was fixed