nextcloud / nextcloud/server

Workflowengine "The given regular expression is invalid"

Open
#23,666 13 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 25-feedback bug feature: workflows
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Steps to reproduce
  1. Create a new flow (concrete workflow app doesn't matter)
  2. Choose File MIME type
  3. Choose matches (or does not match)
  4. Choose PDF documents (or Folder)

image

Note: the filters for Images and Office Documents are working.

Expected behaviour

Workflow can be created

Actual behaviour

If i try to save the workflow an error message is raised "The given regular expression is invalid"

Server configuration

Operating system: Ubuntu 20.04

Web server: Apache2

Database: MySql 8.0

PHP version: 7.4

Nextcloud version: 20.0.1

Additional information

Currently there is also an open issue at https://github.com/R0Wi/workflow_ocr/issues/32 where multiple users reported this problem.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the regex definitions in apps/workflowengine/src/components/Checks/FileMimeType.vue, then inspect validation in apps/workflowengine/lib/Check/AbstractStringCheck.php around line 91. Reproduce the File MIME type matches and does-not-match cases for PDF documents and Folder. Done means these filters use valid patterns and the workflow can be saved without the invalid-regex error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
full-stack
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.