Skip to content
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

Errors in duplication and copying Neatline items with geometry / WKB #477

Open
AntjeAnderson opened this issue Oct 10, 2019 · 11 comments
Open

Comments

@AntjeAnderson
Copy link

I have attempted in every way I can think of to copy either a Neatline Exhibit or copy Neatline Records into a new exhibit--partly just to create a backup copy, partly because I need to be able to export a Neatline Exhibit (if possible) to another Omeka website rather than recreating my map on that site. But

a) the duplication error noted by others but apparently not resolved resulted in hundreds of empty exhibits being created.

and
b) every time I go into the database with MyPhP and try to copy a Neatline Record, I get an error regarding the geometry. It either cannot find any and tells me "Cannot get geometry item from data you send to the GEOMETRY field" or, if I choose any WKB geometry (the only option apart from text), it gives me an error message about a wrongly placed \ near the geometry. I cannot remove that . I have tried to edit the geometry in various ways, but I simply do not know what other parameters I need to change.

If there are instructions for this, or if there is another way of copying / duplicating the records, please let me know. I have also tried to create a CSV export file to at least have backups of my data, but the geometry column is unreadable gobbledigook. Even just understanding what I would need to do with the WKT/WKB data that is being stored to make it useable would be helpful.

Thank you.

@jeremyboggs
Copy link
Contributor

@AntjeAnderson I'm looking at this now, and hope to send you an update by the end of the day, if not sooner. Can you share some more system information with us? Click on the "System Information" link in the footer of your Omeka admin panel. That will help me try to recreate the environment, with the same versions of PHP and MySQL and such, so I can see if I encounter the issue as well.

@AntjeAnderson
Copy link
Author

AntjeAnderson commented Oct 10, 2019 via email

@AntjeAnderson
Copy link
Author

AntjeAnderson commented Oct 10, 2019 via email

@jeremyboggs
Copy link
Contributor

@AntjeAnderson I"m sorry, the image isn't displaying. Can you try again, or just email it to me directly at jeremy@virginia.edu?

@jeremyboggs
Copy link
Contributor

@AntjeAnderson From the screenshot you shared, it appears your host is using MySQL server 10.2.26, which is rather startling, because I'm not sure that version is even available from MySQL itself. I have to look around further. If you can confirm with your host that your hosting does indeed provide 10.2.26, and if that's some database other than MySQL, that might help.

@jeremyboggs
Copy link
Contributor

@AntjeAnderson Can you confirm in your Reclaim Hosting adminstrative panel that you're using MySQL, or using MariaDB? I suspect the latter, because the latest version of MySQL is 8.0 but MariaDB is 10.4. If so, you should see if you can switch to MySQL. We've never developed or testing Neatline on MariaDB. I'll see if I can get a test instance running with it, and see if I can replicate the problem you're having. Right now, I can't, using PHP 7.2 and MySQL 5.7

@AntjeAnderson
Copy link
Author

AntjeAnderson commented Oct 10, 2019 via email

@techgique
Copy link

Hi all. @karindalziel asked me to take a look at this issue. I assume by now y'all have learned that MariaDB is a fork of MySQL by its creator a while after Oracle took control of the project. It's supposed to be drop-in replacement compatible with MySQL. It's possible that newer versions of the two have diverged a little, but that may or may not be relevant here.

I have a couple general ideas though. It's possible this is a phpMyAdmin bug or lacking feature where its interface / functionality isn't compatible with these fields. Are you able to export to a .sql file and reload / import that into a new database or table? Generally .sql files are the most reliable for backing up MariaDB/MySQL data in plain text for later restoration, rather than a CSV. You may see these files referred to as a "logical backup".

My other idea (which seems like more of a stretch based on the error message @AntjeAnderson reported) is the possibility that records from multiple tables are necessary to export / migrate Neatline records. If there are multiple records relying on each other, its possible that could be failing upon trying to load a single one of the records without the others. This would involve disabling foreign key constraints temporarily while importing data.

I'm unfamiliar with WKB and GEOMETRY records so that could be way off base. I see that Neatline uses the GeoPHP library to work with them, and that library hasn't been updated since 2014. This makes me a little more skeptical that newer versions of MariaDB and MySQL would have broken compatibility. Especially if the Neatline functionality is generally working through Omeka other than this record duplication / export work.

I'm not sure if any of this is helpful, but I hope it gives you some more ideas. ✌️

@AntjeAnderson
Copy link
Author

AntjeAnderson commented Oct 18, 2019 via email

@techgique
Copy link

The "random gobbledigook" is probably binary data which won't look like base64 when viewing the text file. That must just be how the database software stores the info, so it will require a database client such as phpMyAdmin to read it. Even then, it may be formatted in such a way that only the GeoPHP and underlying GEOS libraries can read it and produce a human-readable display.

I'm not very familiar with this type of data, but these are my guesses as to what is going on.

@timmmmyboy
Copy link

For what it's worth this is happening to us on a server running MySQL 5.7 attempting to import from another server running MySQL 5.5, so seems the issue is not related to MariaDB at all. We'd love to know if there is another way to export/import Neatline records when this fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants