You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workflowengine "The given regular expression is invalid" #23666
Thanks for reporting 👍 I see the same issue on Nextcloud 19.
cc @juliushaertl@blizzz as 'httpd/unix-directory' is not a pattern they cannot use matches as operator. We should probably hide operators which are not compatible to each other. We have the same issue the other way around for File MIME type is Office Documents.
Hi since the number of reported issues at the workflow_ocr app regarding this problem is increasing i'd kindly like to ask what are the plans for this? If we like to implement #23666 (comment) i can try to do this if you're willing to accept my PR ? 😃
On a second thought, it is quite technical for the end user. An admin might now about regex's and stuff, but for the average user "is (not)" or "matches (not)" or the meaning of it is black magic. The best way would be to eliminate the differences (only keep is _(not)) and figure out what is desired by testing the third columns value.
That would be a bigger change however, and not backportable. This is an advantage of your suggestion, so let's go with it.
Changing the UI more radically (it has effects on the backend bits, too) could be something for 22.
NC 21.0.3 Workflow OCR 1.21.1, the problem still persists.
The only way to deal with this, for now, is to remove the other conditional, in my case, it was file MIME = pdf.
As I wanted it to ocr just files created/modified with 2ocr somewhere in its name (insert /2ocr/i in the box), it is usable for now.
I dont have an issue with this anymore in general as after reading all this back when I had the issue I just know what I need to click and what that error actually means...
However I would love to help as far as I can...
I just tested this on 25.0.3 and selected "matches" PDF and it tells me that the regular expression is invalid.
Actually, when you choose "custom MIME type" you are facing a similar error. But this is a bogus user-interface: the placeholder suggests that you just can add "e.g. http/unix-directory". However, the placeholder suggestion is wrong, you need to enter a full-fledged regular expression, i.e. http/unix-directory does not work, but something like |http/unix-directory|.
I have no problems with entering a regular expression, but neither the placeholder nor the cryptic error message The given regular expression is invalid are of any help for directing the struggling user into the right direction.
I experienced this with a up-to-date v25 NC. Screenshots are appended
Activity
kesselb commentedon Oct 24, 2020
Thanks for reporting 👍 I see the same issue on Nextcloud 19.
cc @juliushaertl @blizzz as 'httpd/unix-directory' is not a pattern they cannot use matches as operator. We should probably hide operators which are not compatible to each other. We have the same issue the other way around for
File MIME type is Office Documents.R0Wi commentedon Feb 25, 2021
Hi since the number of reported issues at the
workflow_ocrapp regarding this problem is increasing i'd kindly like to ask what are the plans for this? If we like to implement #23666 (comment) i can try to do this if you're willing to accept my PR ? 😃cc @juliushaertl @blizzz @kesselb
kesselb commentedon Feb 25, 2021
Cool 👍
A pinned FAQ issue might help with that. At least here at nextcloud/server it helps a bit.
R0Wi commentedon Feb 25, 2021
Thanks for the hint, will give it a try 😄
So basically i'd implement it the following way (given that the first column is set to
File MIME type):isoris notthe filetypesFolder,PDF DocumentsandCustom mimetypewill be shown in the third columnmatchesordoes not matchthe regex based typesImagesandOffice documentswill be shown in the third columnWould that be the way to go @kesselb ?
blizzz commentedon Feb 25, 2021
@R0Wi generally that sounds good to me.
On a second thought, it is quite technical for the end user. An admin might now about regex's and stuff, but for the average user "is (not)" or "matches (not)" or the meaning of it is black magic. The best way would be to eliminate the differences (only keep
is _(not)) and figure out what is desired by testing the third columns value.That would be a bigger change however, and not backportable. This is an advantage of your suggestion, so let's go with it.
Changing the UI more radically (it has effects on the backend bits, too) could be something for 22.
szaimen commentedon Jun 23, 2021
I suppose this is still valid on NC21.0.2?
R0Wi commentedon Jun 24, 2021
AFAIK unfortunately yes. Did not manage to create a PR, yet 😢
FernandoMarques-Santos commentedon Jul 29, 2021
NC 21.0.3 Workflow OCR 1.21.1, the problem still persists.
The only way to deal with this, for now, is to remove the other conditional, in my case, it was file MIME = pdf.
As I wanted it to ocr just files created/modified with 2ocr somewhere in its name (insert /2ocr/i in the box), it is usable for now.
4 remaining items
github-cli commentedon Jan 23, 2023
I dont have an issue with this anymore in general as after reading all this back when I had the issue I just know what I need to click and what that error actually means...
However I would love to help as far as I can...
I just tested this on 25.0.3 and selected "matches" PDF and it tells me that the regular expression is invalid.
rotdrop commentedon Mar 2, 2023
Actually, when you choose "custom MIME type" you are facing a similar error. But this is a bogus user-interface: the placeholder suggests that you just can add "e.g. http/unix-directory". However, the placeholder suggestion is wrong, you need to enter a full-fledged regular expression, i.e.
http/unix-directorydoes not work, but something like|http/unix-directory|.I have no problems with entering a regular expression, but neither the placeholder nor the cryptic error message
The given regular expression is invalidare of any help for directing the struggling user into the right direction.I experienced this with a up-to-date v25 NC. Screenshots are appended
Nils160988 commentedon Nov 13, 2023
Still valid for NC 27.1.3
fix: restrict mime type list depending on check operator
fix: restrict mime type list depending on check operator
fix: restrict mime type list depending on check operator
fix: restrict mime type list depending on check operator
fix: restrict mime type list depending on check operator
fix: restrict mime type list depending on check operator
fix: restrict mime type list depending on check operator
fix: restrict mime type list depending on check operator
fix: restrict mime type list depending on check operator