contao / core-bundle

[READ-ONLY] Contao Core Bundle
GNU Lesser General Public License v3.0
123 stars 58 forks source link

Compilation failed: POSIX collating elements are not supported at offset 5 #1656

Closed qzminski closed 6 years ago

qzminski commented 6 years ago

I have troubles logging into the Contao backend under version 4.5 and 4.6-RC. The error I get is shown on the screenshot:

2018-08-06 at 11 41

It is probably related to this line of code:

https://github.com/contao/core-bundle/blob/master/src/Translation/Translator.php#L96

I have investigated it a bit and discovered that my PCRE version is 8.32, whereas on the other server where it worked is 8.41. I am not completely sure if it's relevant to the PCRE version but I am unable to update the library version because it's not available at the moment for CentOS/cPanel/EasyApache I am using right now.

Has anyone of you encountered the same problem? Is PCRE old version really the problem here? If so, is there any chance of making this regexp compatible with older PCRE versions as well?

Any help would be appreciated :wink:

Toflar commented 6 years ago

/cc @ausi I guess the regex can be adjusted so it's compatible with both. wdyt?

ausi commented 6 years ago

@qzminski Can you please try if replacing the regex with '/(?:\\\\[\.\\\\]|[^\.])++/s' fixes the issue?

ausi commented 6 years ago

The next line has to be changed as well probably:

preg_match_all('/(?:\\\\[\.\\\\]|[^\.])++/s', $id, $matches);
$parts = preg_replace('/\\\\([\.\\\\])/s', '$1', $matches[0]);
qzminski commented 6 years ago

That works like a charm sir 😎 any chance to get it merged into 4.6?

leofeyer commented 6 years ago

@ausi Can I remove the /s modifier?

ausi commented 6 years ago

Yes.

leofeyer commented 6 years ago

Fixed in ba03d0cccac1a326a3c20aa8f7ab7b2623b46d21 then.

qzminski commented 4 years ago

@leofeyer can you re-open this issue? The error occurs again now in 4.8.4, see referenced commit above: https://github.com/bohnmedia/contao/commit/f1e0671a9596b20dcae9d71acd73f35ce1e6aef8

I would rather say it's quite urgent as it breaks down the Contao backend for some systems.

leofeyer commented 4 years ago

I can reopen the issue, but it would not be fixed as it is in contao/core-bundle. Please create a new issue in contao/contao instead.