jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Topic started by: belini on 15.09.2017 21:40:52

Title: Another (Illegal mix of collations error)
Post by: belini on 15.09.2017 21:40:52
Hello,
Look here again with more problem to solve. :-\ ;)

My system has 47 folders / categories,  so far so good, so I started copying files (Word .dot files) from another server to those folders. At first it was all right and automatic monitoring was updating the downloads with their respective categories.

When I realized some categories were not being updated, even having files inside the server folders, it was then that the following error began to appear:

  1267 Illegal mix of collations (utf8_general_ci, IMPLICIT) and (utf8mb4_general_ci, COERCIBLE) for operation '='

I turned off the automatic updater monitoring and on the control panel I pressed the "Check Download area now." Link, but the error continued, see attachment.

I researched the forum and found a post with a similar error: http://www.jdownloads.com/index.php/support-forum.html?topic=8245.msg34167#msg34167

I followed the guidelines of the post, all my tables and database uses utf8_general_ci, what could be going wrong?



[gelöscht durch Administrator]
Title: Re: Another (Illegal mix of collations error)
Post by: Arno on 16.09.2017 11:25:15
Hi,
QuoteMy system has 47 folders / categories,  so far so good, so I started copying files (Word .dot files) from another server to those folders. At first it was all right and automatic monitoring was updating the downloads with their respective categories.

When I realized some categories were not being updated, even having files inside the server folders, it was then that the following error began to appear:

Code: [Select]
1267 Illegal mix of collations (utf8_general_ci, IMPLICIT) and (utf8mb4_general_ci, COERCIBLE) for operation '='
I turned off the automatic updater monitoring and on the control panel I pressed the "Check Download area now." Link, but the error continued, see attachment.
1. Can it be that the problem exist only when your filenames has special characters? (see your pic)
2. Have you read this informations about this scenario?
3. Have you used also prior filenames with special characters?
4. Have you corrected something in your DB after you have find and read the other topic?

For me it seems that you have still different collations in your DB. This can also be single fields. Send me login data for your phpmyadmin and a link via PM then I will check it.
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 18.09.2017 20:52:12
Quote from: Arno on 16.09.2017 11:25:15
Hi,1. Can it be that the problem exist only when your filenames has special characters? (see your pic)
2. Have you read this informations about this scenario?
3. Have you used also prior filenames with special characters?
4. Have you corrected something in your DB after you have find and read the other topic?

For me it seems that you have still different collations in your DB. This can also be single fields. Send me login data for your phpmyadmin and a link via PM then I will check it.

Well, this is all very strange because it was working.

When I checked the solution for the other topic, I noticed that I had some utf8mb4_general_ci and other utf8_general_ci tables, so I converted the entire DB, all tables and all fields to utf8_general_ci, I checked everything one by one.

As I said before, everything was working, when I started having problems I thought that solution of the other topic would work, but it did not help much.

As I know that special characters generate many problems I avoid using them and I configured the jdownloads to avoid this, configuring just like the image attached to the post.

The only place that still appears utf8mb4_general_ci is in the Joomla configs, see the attachment. That option "Database Connection Collation" should be something internal of Joomla, here a link of the Joomla Issue Tracker about this: https://issues.joomla.org/tracker/joomla-cms/7173

I do not understand where the collation conflict might be, the only place that has a special character is in the title of the download or category, but when I type only. In the automatic process of monitoring the directories all the files and directories are without special characters and without spaces.

The only thing different are files that have long names, sometimes longer than 30 characters, but all without spaces (underscore or dash replacing) or special characters.

I'll keep trying to fix it here.

[gelöscht durch Administrator]
Title: Re: Another (Illegal mix of collations error)
Post by: Arno on 20.09.2017 11:42:34
Hi,
many thanks for the link. Maybe should we change also in jDownloads all collations to utf8mb4_general_ci.
But I'm not sure that this really solve your problems.

It is bad that your error message has not more informations about the table or data field which create the error. Or a script line. Maybe could you activate the debug option in Joomla and try it again?  ::)
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 21.09.2017 15:10:48
Quote from: Arno on 20.09.2017 11:42:34
Hi,
many thanks for the link. Maybe should we change also in jDownloads all collations to utf8mb4_general_ci.
But I'm not sure that this really solve your problems.

It is bad that your error message has not more informations about the table or data field which create the error. Or a script line. Maybe could you activate the debug option in Joomla and try it again?  ::)

Ok,

I enabled Joomla debug and "Download directory monitoring?" to "Yes" in jDownloads/Configuration tab "Monitoring".

Then I clicked in jDownloads/Control Panel,  below I pasted the footer page information of the error

I hope this helps.


QuoteAn error has occurred.  1267 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='                                       
JROOT/libraries/joomla/database/driver/mysqli.php:650                                 
Call stack
# Function Location
1      ()      JROOT/libraries/joomla/database/driver/mysqli.php:650     
2      JDatabaseDriverMysqli->execute()      JROOT/libraries/joomla/database/driver.php:1691     
3      JDatabaseDriver->loadObjectList()      JROOT/administrator/components/com_jdownloads/helpers/jdownloadshelper.php:2363     
4      JDownloadsHelper::runMonitoring()      JROOT/administrator/components/com_jdownloads/views/jdownloads/tmpl/default.php:206     
5      include()      JROOT/libraries/src/MVC/View/HtmlView.php:695     
6      Joomla\CMS\MVC\View\HtmlView->loadTemplate()      JROOT/libraries/src/MVC/View/HtmlView.php:230     
7      Joomla\CMS\MVC\View\HtmlView->display()      JROOT/administrator/components/com_jdownloads/views/jdownloads/view.html.php:35     
8      jdownloadsViewjdownloads->display()      JROOT/libraries/src/MVC/Controller/BaseController.php:672     
9      Joomla\CMS\MVC\Controller\BaseController->display()      JROOT/administrator/components/com_jdownloads/controller.php:46     
10      jdownloadsController->display()      JROOT/libraries/src/MVC/Controller/BaseController.php:710     
11      Joomla\CMS\MVC\Controller\BaseController->execute()      JROOT/administrator/components/com_jdownloads/jdownloads.php:39     
12      require_once()      JROOT/libraries/src/Component/ComponentHelper.php:392     
13      Joomla\CMS\Component\ComponentHelper::executeComponent()      JROOT/libraries/src/Component/ComponentHelper.php:367     
14      Joomla\CMS\Component\ComponentHelper::renderComponent()      JROOT/libraries/src/Application/AdministratorApplication.php:101     
15      Joomla\CMS\Application\AdministratorApplication->dispatch()      JROOT/libraries/src/Application/AdministratorApplication.php:159     
16      Joomla\CMS\Application\AdministratorApplication->doExecute()      JROOT/libraries/src/Application/CMSApplication.php:267     
17      Joomla\CMS\Application\CMSApplication->execute()      JROOT/administrator/index.php:51     
Title: Re: Another (Illegal mix of collations error)
Post by: Arno on 21.09.2017 15:52:00
Thanks for the posted result. I will check it.
Title: Re: Another (Illegal mix of collations error)
Post by: Arno on 25.09.2017 11:41:33
Quote1. Can it be that the problem exist only when your filenames (or folders) has special characters? (see your pic)
2. Have you read this informations about this scenario?
3. Have you used also prior filenames (or folders) with special characters?
4. Have you corrected something in your DB after you have find and read the other topic?
5. Can you create new categories with special characters?
Could you please give me the answers?

When possible send me also data for a backend access via PM.
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 26.09.2017 19:11:51
Quote from: Arno on 25.09.2017 11:41:33
5. Can you create new categories with special characters?
Could you please give me the answers?

When possible send me also data for a backend access via PM.

Login for phpmyadmin and joomla backend? :-\
Title: Re: Another (Illegal mix of collations error)
Post by: Arno on 27.09.2017 09:03:23
Hi,
please wait a day. It is possible that we have a bug in the scan.php.  :-\
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 28.09.2017 13:38:12
Quote from: Arno on 27.09.2017 09:03:23
Hi,
please wait a day. It is possible that we have a bug in the scan.php.  :-\

Ok
Good luck
Title: Re: Another (Illegal mix of collations error)
Post by: ColinM on 29.09.2017 01:07:41
Hi
latest jD should have fixed the problem  (v3.2.56)
Colin
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 29.09.2017 16:55:31
Quote from: ColinM on 29.09.2017 01:07:41
Hi
latest jD should have fixed the problem  (v3.2.56)
Colin

I'm using version 3.2.56 and the error problem continues.
Just do not understand, because this occurs, because the directories on the server are names with no spaces (underline in place) and no special accents, the files also have no spaces (underline in place) and no special accents, I use only normal characters ( "A ... Z", "a ... z", "0 ... 9", "-", "_")
The only thing that has accentuation is the title of the category, but this is just for storage in the database.
Also remembering that it was working, but from one moment to another began to appear the error reported at the beginning of this thread.
Title: Re: Another (Illegal mix of collations error)
Post by: ColinM on 29.09.2017 18:27:37
Hi
I also do not understand !  There was a bug in the scan routine which Arno has fixed.  So it is possible that when the downloads were created whilst the bug was present that the collation mix up occurred.  So does this happen with specific display of certain Categories or certain Downloads?
Colin
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 02.10.2017 14:15:22
Quote from: ColinM on 29.09.2017 18:27:37
Hi
I also do not understand !  There was a bug in the scan routine which Arno has fixed.  So it is possible that when the downloads were created whilst the bug was present that the collation mix up occurred.  So does this happen with specific display of certain Categories or certain Downloads?
Colin

The error occurs when I enable automatic monitoring, or if it is disabled, when I click "Check Download area now", which theoretically does the same thing, but manually.
See the first posts, where the problem is explained.
I have no problems downloading, the problem is in the ability to recognize the files in the directories, which stopped working.
Another strange thing is that it works, starts reading the first directories, but stops halfway.
Title: Re: Another (Illegal mix of collations error)
Post by: Arno on 02.10.2017 14:28:19
Hi belini,
I have not forget you. But I be ill since a few days. Not heavy but I can not work fulltime at the moment.
I hope I could find the reason for your problem but need a few days more.

In the meantime could you try to activate a hidden option in the db table _jdownloads_config. Here exist at the end the option use.files.and.folder.settings.for.monitoring (see pic). You could change the value to 1 to activate it. Try it then again.

[gelöscht durch Administrator]
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 02.10.2017 20:01:38
Quote from: Arno on 02.10.2017 14:28:19
Hi belini,
I have not forget you. But I be ill since a few days. Not heavy but I can not work fulltime at the moment.
I hope I could find the reason for your problem but need a few days more.

In the meantime could you try to activate a hidden option in the db table _jdownloads_config. Here exist at the end the option use.files.and.folder.settings.for.monitoring (see pic). You could change the value to 1 to activate it. Try it then again.

Hi Arno,
I hope you get better.
As for your request, I do not have in my _jdownloads_config table an option called use.files.and.folder.settings.for.monitoring. The most similar is files.autodetect.

I did some tests here, copied all 47 directories to my local machine and deleted all files from all folders by jDownloads, I kept the directories / categories only.

I then copied using ssh some files from my local folder to the corresponding folder of jdownloads and then clicked on "Check Download area now" in the control panel.

The files are reading without errors, just a message has appeared so now (apparently for every file it finds in the directory):

Notice: Undefined property: jdownloadsTabledownload::$id in /var/www/html/plugins/content/jevents/jevents.php on line 25

I have not yet copied all files to their respective folders, but I'll do so until I see if any errors appear, just like before.
Title: Re: Another (Illegal mix of collations error)
Post by: Arno on 02.10.2017 21:33:40
This error has nothing to do with jDownloads. It comes from a jevent plugin.
Title: Re: Another (Illegal mix of collations error)
Post by: ColinM on 02.10.2017 23:01:31
Hi
The field use.files.and.folder.settings.for.monitoring is the field with id 531.  Maybe you did not look far enough?  If it is missing how many fields do you have in the
xxxx_jdownloads_config table.
Colin
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 03.10.2017 14:49:14
Quote from: Arno on 02.10.2017 21:33:40
This error has nothing to do with jDownloads. It comes from a jevent plugin.
Ok, but this property jdownloadsTabledownload: is not it from jDownloads?

Notice: Undefined property: jdownloadsTabledownload::$id in /var/www/html/plugins/content/jevents/jevents.php on line 25

If so, does jEvents refer to it? Strange how is this happening?
Theoretically the jEvents developers will not reference a property that does not belong to their / project plugin.

Oh, I found use.files.and.folder.settings.for.monitoring in my case the id is 268, remembering that my installation of jdownloads is full in 3.x series. I'm not going to change for the moment, because now jDownloads is reading the files.

Still on the issue related to "notices", they appear only inside the Control Panel of jDwonloads, when it reads new files from the directory, see in the attachment when the automatic monitor reads three new files from the directory.

[gelöscht durch Administrator]
Title: Re: Another (Illegal mix of collations error)
Post by: Arno on 03.10.2017 16:25:10
QuoteIf so, does jEvents refer to it? Strange how is this happening?
Theoretically the jEvents developers will not reference a property that does not belong to their / project plugin.
A Joomla content plugin can change content from every extension. But I have no idea what JEvent want to change here. By the way, the jdownloads_files table has not an id field only a file_id field. That could be the reason for this notice. 'Notice' messages should you deactivate via Joomla options (TAB System / Error Reporting = Simple or None).
Title: Re: Another (Illegal mix of collations error)
Post by: belini on 04.10.2017 15:30:02
Quote from: Arno on 03.10.2017 16:25:10
A Joomla content plugin can change content from every extension. But I have no idea what JEvent want to change here. By the way, the jdownloads_files table has not an id field only a file_id field. That could be the reason for this notice. 'Notice' messages should you deactivate via Joomla options (TAB System / Error Reporting = Simple or None).

Hi,
Apparently the scan monitor is working now.
One of the things I discovered is that I had a file where the file name had invalid characters.
Now I can not tell if the latest updates or the file name adjustment made everything work.
Apart from the "Notice" issue, everything is ok.
I understand that I can disable 'Notices' to not appear on the screen, but in the system log keeps registering, it is nothing serious, but who knows in the future this will not occur any more.
My question, when I delete a file directly in the directory jDownloads does not erase the reference inside it, is this normal behavior?

Title: Re: Another (Illegal mix of collations error)
Post by: ColinM on 04.10.2017 16:23:28
Hi
QuoteMy question, when I delete a file directly in the directory jDownloads does not erase the reference inside it, is this normal behavior?
If you delete the file directly jDownloads does not know it has been deleted until you run a monitor scan. So yes it is normal.  jD keeps all the info in the relevant database tables.
Colin