-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error enabling historic events #4880
Comments
You have added a 4-byte UTF-8 character. Probably an emoji or flag. There is currently an open issue (#2950) to convert webtrees from 3-byte UTF-8 to 4-byte UTF-8. This is currently in progress. The difficulty is that depending on the history of your site, the exact structure of your database is unknown (e.g. index names, foreign keys, etc.). Our database library assumes you know the exact structure. So, I need to convert all the database migrations (and possibly the rest of the database abstraction layer) to use |
I'm 100% sure that I didn't import an emoji in my gedcom. And I'm exporting - re-importing frequently my gedcom file and I know its content. It might be a stupid suggestion but the problem might come from the history event itself with its title: “Faits historiques de France 🇫🇷” \xF0\x9F\x87\xAB\xF0\x9F... in the error message is actually the French flag. |
This should not be a problem. This value is not stored in the database - only displayed. I just enabled the french historic events on my dev machine and also on the demo site - and do not get any errors. The error message says that this data is being stored in the "session data". Could you have used the clippings cart to copy something? There isn't much else stored in the session. |
I don't think so and I have re-imported my gedcom if that matters. You know your stuff... I have access to mysql and I can dump the session table. I see my id for the row mentioned in the error. Is the problem in that table or is it somewhere else? How can I search my mysql database to find the culprit? |
The data isn't in the database. webtrees attempted to write the data to the database, but MySQL rejected it. |
I'm super confused! Sorry about that. But then, where is my problem? I have only one tree, with full control of the gedcom that I can re-import. Then, I have standard medias. That's all. In my gedcom file, there is no \xF0 character... |
Is this the module that is supplied with webtrees, or is it a third-party one? Do you have any other third-party modules installed? |
I'm just clicking on historic events. |
The original stack trace clearly shows that the module title is definitely stored in the database, as part of the session data, via the flash messages:
|
I have done something very stupid: I went to the php file and removed that damned flag. Problem solved! The error disappears. It seems to make sense: when enabling, the title is copied in the session row of the table in the database and the 4-byte creates the problem. Now, where do those "faits historiques" appear? Because I don't see them anywhere. That was my initial objective to understand what this feature is about... |
These facts are shown on the individuals "Facts and events" tab - but only when you use the French language. What version of MySQL/MariaDB do you use? |
At last, I see the events!!! I was in English language though I'm French.
So to recap the situation, I can make it work by removing the flag (4-byte character) in the php file. |
Can you run this SQL statement for me
Originally, the column A So, the error depends on when you created your database. I am currently working on an update from
|
Did you mean?
It's longtext
|
OK - as I guessed. Alter this column and it should fix your problem. |
Thank you for your help. I let you close the bug and modify the code of the table creation if you think it's appropriate. Once again, really great software! |
Hi, i was just curious why you dont use utf8mb4_unicode_520_ci when you upgrade the db, isnt that the new standard for international acceptance? Is that because of possible legacy issue? And i agree great software. I am sure you dont hear this enough, thank you so much :) |
The software was written long before utf8mb4 was available. Database updates are problematic for many reasons. For example; on large databases, simple things like "CREATE INDEX" will take longer than most server's HTTP timeout. Also, depending on the history, some sites may have slightly different indexes (names, columns, unique, etc.). Updating databases when you can't be 100% sure of the structure is risky. I'm currently working on this, as it is blocking most significant code development. |
Thank you for the quick reply. I understand completely. I understand that for now these budget hosting companies still support old versions of php and other dependencies and are feeling the pressure now to upgrade. They have put it off for so long and now its crunch time and that puts so much pressure on developers to meet the need. Please remember that no matter what you do there is no way to make everyone happy. Someone along the way is not going to be able to use the software (or have to make custom changes to it) in their environment. That is why i stopped supporting WAMP and LAMP and a few others for my software, and you may find yourself having to cut some cords yourself in order to move forward more gracefully. I just wanted to say you have a nice piece of software here and i thank you for your time doing it. You have some nice config options that i like very much. Even though my software project (not a competitor) is just straight PHP, HTML, CSS, JS with no packages, and no frameworks just from blank page with no helpers, i really love many of the features you have incorporated, so great job with that. I may not know my way around the framework but i do know how to search and find things. To all that may see this message, please be patient, i can tell a good developer when i see one and this project is in good hands. So please just relax and let them do what they need to do in the time they need to do it. Hats off to ya! |
Congratulations for all the work. It's an amazing php software.
I'm on 2.1.17. When I enable "Faits historiques de France" in Historic events, I get the following error. Any idea what's wrong?
The text was updated successfully, but these errors were encountered: