Create Product/Service does NOTHING!

I suddenly noticed that I can’t create new Products or Services! Everything else appears to still work. I don’t know what changed. I click the “CREATE” button and nothing happens (“CANCEL” works fine).

image

I have restarted Apache and the server, no difference.
I Iogged into phpMyAdmin and was able to manually add rows to the product table.
I have tried on multiple systems both local and remote. All seem to be affected (unable to create product/service).

Last configuration changes I made were to the Proposals module. I don’t think anything was related to this, but I may have inadertently done something.

Before this, I haven’t created any new products for at least a couple of months. (I imported the majority of them from another database.)

Any ideas?

FYI, the “CLONE” button works fine.

Which version of Dolibarr ?
What is the rule for the “numbering of product ref” into setup of module product ?

Hello @eldy
Dolibarr version is 19.02
Numbering “mask” is setup as this: {000000000}

(also, I have attached a screen capture of my module settings)

Thank you for your help.

When you put your mouse on the “i” on the line “Elephant”, what do you have ?
Also may be you can try to upgrade to 19.0.3…

“i” message on line “Elephant”:

This is the first time I’ve used Dolibarr (only been running for a couple of months). My main concern with updating is of possibly breaking something else.
What is the procedure to update (I’m running an Ubuntu server)?

BTW, this was working before. I created several sample products before ever attempting import.

Everything looks good.
May be you can enable the module Log debug. Produce the error and check the dolibarr.log file.
A check into apache error.log file may provide information too.

I enabled “Debug Logs” and “Debug Bar” in modules.
Can you guide me to the location of the .log file?
Thanks

Hello,

If you go on the Debug log module configuration you can download it.
Or it’s a the root of documents folder.

Thanks @ksar
I found it, but it has a bunch of stuff from last month on it. Is there a way to clear it or clean it up so as to only focus on todays logs?

Thanks

@eldy and @ksar
attached debug log
dolibarr.log (57.7 KB)

Hello,

On the log file, there is no sign of clicking on create button.
So can you explain a bit more what is happening when you click on create ?
I would assume nothing, so the request is not sent to the server.

Can you try with a different web browser ?

Hello @ksar
Yes, when I click “CREATE” button nothing happens at all, unless there is a required field empty. If a required field is not filled, then it will prompt to fix it. But other that that, nothing.

Another clue:
Today I noticed that if I click “CANCEL” to quit, but then use the 'Back" browser button to return, the “CREATE” button suddenly works!?!? Very strange.

@ksar
Yes, as I mentioned in my initial post, I have already tried 3 browsers (Chrome, Edge, Firefox) on multiple computers.

@ksar and @eldy

I may have stumbled on another clue. I get this console error in each of my browsers:
image

An invalid form control with name=‘desc’ is not focusable.

<textarea id="desc" name="desc" rows="4" style="margin-top: 5px; width: 90%; visibility: hidden; display: none;" class="flat " required=""></textarea>

Figured out the problem, but not sure of the real solution (may be a bug)

I had added some “Mandatory form fields” during the late stages of my setup. One of them was “desc” (Description):

It looks like this caused the issue. As soon as I removed that requirement, “Create” button started adding records correctly again:

@eldy and @ksar
Is this a bug that can be fixed? I’d really like to make the Description field mandatory for future additions.

Hi,

Good work !
Can you create a bug report on Github ? Sign in to GitHub · GitHub

@ksar Thanks for the help

The trouble was the addition of the “required” on a field that is managed by ckeditor. And ckeditor dos not support the required attribute.
Another way of working to test mandatory fields has been implemented for v20 so should work with v20.

2 Likes

@eldy
Now having the same problem with CLONE commercial proposal! Nothing happens when I click…

Any ideas?

Can anyone check to see if that functionality is working with their system? I’m on v19.02

Thanks

Figured it out!

Somehow I had a Computed Field that was marked as MANDATORY! The problem with that is… that there isn’t an option to unmark it Mandatory:

It probably started out as a simple string, which I then made into a Computed Field (at which point the option to mark as not Mandatory disappeared). That’s a wierd one!