The error returned was illegal argument to a regular expression

Ответили на вопрос 1 человек. Оцените лучшие ответы! И подпишитесь на вопрос, чтобы узнавать о появлении новых ответов.

REZ1DENT3

  • Сейчас проверил — да. Хостер обновил версию. И что делать?

  • REZ1DENT3

  • Максим Бабичев, по каким аргументам фиксить?, там в ссылке написано ‘rulebook’ и ‘node body’ а на dle там другие вроде. Короче я хз как. Откатывать хостера просить незнаю есть ли смысл.

  • REZ1DENT3

    JohhnyT, проблему я выделил еще в самом начале, смотрите внимательно)

    Дублирую:

    category regexp ‘[[:<:]](137)[[:>:]]’

  • REZ1DENT3

    Illegal argument to a regular expression.

    А вообще, ошибку вам прекрасно бросает и сам PDO

  • Максим Бабичев, это прописывать нужно в консоль phpmyadmin или как мне действовать, а то я нуб?) И как быть если все категории с такой ошибкой, (написал это страницу со 137 кат. просто для примера)?

  • DLE обновить надо. Наверняка там обновили запрос под новые требования.

  • TheAndrey7, мне под новую версию стили тяжело менять будет

  • REZ1DENT3

    JohhnyT, выхода у тебя нет. TheAndrey7 верно говорит. У тебя три варианта:
    1. Поправить запрос в базу под MySQL 8
    2. Обновить DLE
    3. Откатить БД

  • Максим Бабичев, выбираю вар. 1) Можете написать запрос для всех категорий на сайте, а не только 137 ?

  • Максим Бабичев, можно ещё проблемный участок код выдрать из более нового дистрибутива, если лень обновляться)




  • ashafer

  • May 29th 2020

  • Thread is marked as Resolved.
    • #1

    I’m trying to get search to work on a new site, but no results show and I see this in debug.

    SELECT SQL_CALC_FOUND_ROWS DISTINCT ‘PerchContent_SearchHandler’ AS source, » AS score, » AS col1, » AS col2, » AS col3, » AS col4, » AS col5, » AS col6, » AS col7, » AS col8 FROM perch3_content_regions WHERE 1=0 UNION SELECT ‘PerchContent_RunwaySearch’ AS source, 1 AS score, c.collectionKey AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, c.collectionOptions AS col4, c.collectionKey AS col5, c.collectionKey AS col6, collectionTemplate AS col7, c.collectionKey AS col8 FROM perch3_collections c, perch3_collection_items ci, perch3_collection_revisions cr WHERE c.collectionID=cr.collectionID AND cr.itemID=ci.itemID AND cr.itemRev=ci.itemRev AND c.collectionSearchable=1 AND cr.itemSearchable=1 AND ci.itemSearch REGEXP ‘[[:<:]]pedestrian[[:>:]]’ ORDER BY score ASC LIMIT 0, 10

    Invalid query: SQLSTATE[HY000]: General error: 3685 Illegal argument to a regular expression.

    • #2

    Hi,

    Which version my mysql are you using? You can find this from Settings > Diagnostics

    • #3

    Was probably an issue with the version. I actually switched machines (with a new install) recently and now it’s working fine.

    • #4

    As far as I know MySQL 8 does not support [[:<:]][[:>:]] for word boundary in regex expressions. So the search handler (your use case) and the contains filter won’t work if you use MySQL 8.

    cc drewm

JoomShaper

Archived Forums

  1. Bug
  1. Arino
  2. Wednesday, 01 April 2020

Hi,

How do I fix it?

thnx :)

Hi there,

Thanks for your reply & glad to heard that your problem solved. So, I can ensure that this is not our problem.

-Thanks

  1. more than a month ago
  2. Arino
  3. # Permalink

Hi there,

Thanks for contacting us. Sorry for the inconvenience. Without checking no way to provide the solution. Would you please provide me your administrator access via PM?

1. Just let me know what have you done previously

-Thanks

  1. more than a month ago
  2. Arino
  3. # 1

  1. more than a month ago
  2. Arino
  3. # 2

  1. more than a month ago
  2. Arino
  3. # 3

  1. more than a month ago
  2. Arino
  3. # 4

Hi,

As per the other thread https://www.joomshaper.com/forums/i-have-a-problem-with-the-joomshaper-indigo-template

I was having an issues with J2Store and the Ardino template.
When I downloaded the Arino quickstart package then I got an error: —

3685 Illegal argument to a regular expression

If I downloaded the Ardino template and the J2Store Product display module, then installed these in to Joomla, there was no problem.

So, looking at the versions of Product display module: —

  • Quickstart with Product display module installed = version 1.25
  • Downloaded Product display module = version 1.33

I then installed J2Store Product display module version 1.33 in to the quickstart installation and the problems were solved.
This also happened with the Indigo quickstart package.

Hope this may be helpful to you…

Note to Joomshaper Please update the Ardino and Indigo quickstart packages to include J2Store Product display module version 1.33

  1. more than a month ago
  2. Arino
  3. # 5

I am aware that this work was carried out with my participation.

Changes will soon be made to other components of J2Store, as there are still problems interacting with MySQL V8 in which the store does not work at all. I personally checked the positive result of the upcoming changes by manually entering them into the products.php file.

  1. more than a month ago
  2. Arino
  3. # 6

I am aware that this work was carried out with my participation.

Changes will soon be made to other components of J2Store, as there are still problems interacting with MySQL V8 in which the store does not work at all. I personally checked the positive result of the upcoming changes by manually entering them into the products.php file.

Hi there, We will fix the module issue and will you please share a screencast video about MySQL storing issue? Thanks

  1. more than a month ago
  2. Arino
  3. # 7

I am aware that this work was carried out with my participation.

Changes will soon be made to other components of J2Store, as there are still problems interacting with MySQL V8 in which the store does not work at all. I personally checked the positive result of the upcoming changes by manually entering them into the products.php file.

Aah, Apologies but I did not realise that you ‘are’ J2Store!

Regards,

Steve

  1. more than a month ago
  2. Arino
  3. # 8

I am aware that this work was carried out with my participation.

Changes will soon be made to other components of J2Store, as there are still problems interacting with MySQL V8 in which the store does not work at all. I personally checked the positive result of the upcoming changes by manually entering them into the products.php file.

Aah, Apologies but I did not realise that you ‘are’ J2Store!

Regards,

Steve

I am not a «J2Store». I am an insider in the process of resolving this issue. There are still problems in the code that J2Store promised to fix in the near future. Details are attached.

Regards,
Nikolay

  1. more than a month ago
  2. Arino
  3. # 9

I am aware that this work was carried out with my participation.

Changes will soon be made to other components of J2Store, as there are still problems interacting with MySQL V8 in which the store does not work at all. I personally checked the positive result of the upcoming changes by manually entering them into the products.php file.

Aah, Apologies but I did not realise that you ‘are’ J2Store!

Regards,

Steve

I am not a «J2Store». I am an insider in the process of resolving this issue. There are still problems in the code that J2Store promised to fix in the near future. Details are attached.

Regards,
Nikolay

Hi there, While we have got an update from the J2store, we will merge up the update. Thanks

  1. more than a month ago
  2. Arino
  3. # 10

There are no replies made for this post yet.
Be one of the first to reply to this post!

This forum is archived

Announcement

  • [2023-02-01] Piwigo NG 2.0-beta
  • [2023-01-24] Piwigo 13.5.0
  • [2022-12-16] Piwigo 13.4.0
  • [2022-11-28] Piwigo 13.3.0
  • [2022-11-17] Piwigo 13.2.0

#1 2019-11-10 18:45:55

windracer
Member
St. Pete, FL
2014-12-28
394

Quick search error (MySQL 8 and REGEXP?)

I’ve run into a problem with quick search after upgrading to MySQL 8 (and PHP 7.3) as part of the Ubuntu 19.10 release. When searching for «short» (less than 5 chars?) terms, it errors out:

Code:

From what I can tell, it’s something to do with the REGEXP prefix/suffix being generated in functions_search.inc.php (starting on line 934) which is used when a search term is too short:

Code:

I’m not a regex expert, but are those «wildcard» syntaxes above still valid?

Piwigo 2.10.1
Operating system: Linux
PHP: 7.3.11-0ubuntu0.19.10.1
MySQL: 8.0.17-0ubuntu2
Graphics Library: External ImageMagick 6.9.10-23

Offline

#2 2019-11-10 20:21:11

erAck
Only trying to help
2015-09-06
1588

Re: Quick search error (MySQL 8 and REGEXP?)

See https://dev.mysql.com/doc/refman/8.0/en … patibility
«Prior to MySQL 8.0.4, MySQL used the Henry Spencer regular expression library to support regular expression operations, rather than International Components for Unicode (ICU).»
The [[:<:]] and [[:>:]] word boundary markers are only supported by the Spencer library, for ICU it would be b instead.

Piwigo needs to be adjusted to adapt to that and support both, depending on MySQL version.

You could try to patch the code to

Code:

(hopefully, untested). I hope I got the escapement of the backslash right here; MySQL itself expects two backslashes to escape one literal, and the additional layer of PHP again needs an escapement. So PHP of \\b should pass \b to MySQL..

Offline

#3 2019-11-10 21:18:18

windracer
Member
St. Pete, FL
2014-12-28
394

Re: Quick search error (MySQL 8 and REGEXP?)

That worked, thanks! Do you want me to file an issue in Github?

Offline

#4 2019-11-11 00:12:26

erAck
Only trying to help
2015-09-06
1588

Re: Quick search error (MySQL 8 and REGEXP?)

Sure, would be best. Thanks!

Offline

#5 2019-11-11 01:37:46

windracer
Member
St. Pete, FL
2014-12-28
394

Re: Quick search error (MySQL 8 and REGEXP?)

Offline

#6 2021-02-19 23:20:47

windracer
Member
St. Pete, FL
2014-12-28
394

Re: Quick search error (MySQL 8 and REGEXP?)

Just realized this hasn’t been fixed so it came back when I upgraded to Piwigo 11. Had to apply the patch to functions_search.inc.php again.

Offline

Понравилась статья? Поделить с друзьями:
  • The binding of isaac rebirth как изменить разрешение
  • The error report contains the following files
  • The beyond hub is currently unreachable some functionality will be unavailable как исправить
  • The battle for middle earth tm launcher error
  • The battle cats ошибка hgt00