Author Topic: Apostrophe catastrophe  (Read 15988 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe Schmo

  • Member
  • *
  • Posts: 1
    • View Profile
Apostrophe catastrophe
« on: February 05, 2011, 10:32:22 pm »
Hi all, I'm new to the forum and love this program.

I've noticed, while building my movie database, that:

1. When an actor or actress has an apostrophe in their name (ie O'Neal), each movie entry creates a new "actor" file for them.  So if I have three movies with, for example, Ryan O'Neal, on the people side of the database there will be three separate entries for him instead of one.

2. Trying to delete this actor's name from the "Actors" field does not always work.  After clicking "Apply Changes" the name most often shows back up.  If I edit the name, like try to just delete the apostrophe, the old name comes back next to the new one.

3. I have the same issue with apostrophes in the studio field causing separate studio entries.  So if I have four movies attributed to the same studio, instead of all four being under a single studio list item, they are individualized.  Here too, I can't just delete the studio name and replace it with the name minus the apostrophe.  If I do try to overwrite the original studio name,  the old and new name appears when I apply the changes.  To work around this I have had to clear the movie master and start over, making sure I change the plugin so that it doesn't populate the studio field.

I wonder if anyone else has run in to this issue before? It seems that the only fields this happens are actors and studios.  It may happen in the Director field but I haven't come across any Irish directors yet.
Any Ideas?

Thanks   

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #1 on: August 11, 2013, 08:24:30 pm »
Yes! Someone else has this problem, I'm not just losing my mind!!! ;D

I realize this is an old thread, but I'm having the same problem as Joe.

Using an apostrophe in a field like Studio seems to cause PVD to create an entirely separate internal record for that studio, so that if you switch to Tree View grouped by studio, you see multiple groups with the same studio name, one for each movie assigned to that studio. And once a movie from the studio with the apostrophe has been added, the studio cannot be changed or removed... edit the movie and clear the Studio field, then click save, and the studio comes right back. Change the Studio field to something else entirely, and PVD acts like the movie has TWO studio names, the original (with the apostrophe) and the one you tried to change it to. Delete both studios from the movie record and the one with the apostrophe comes back again!

I now have 44 movies from the same studio, and every one shows up in its own separate group when "grouped by studio". I can't find any way to get them all grouped together under a single "studio" the way they're supposed to be.

I don't know how long this has been going on, but I suspect it's been awhile. Using PVD 0.9.9.21.

Any idea how to fix this?????

Aimhere

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #2 on: August 26, 2013, 02:25:27 pm »
Two weeks since my last post, and nobody has any ideas???  :(

I really would like to solve this problem and consolidate all of the separate group-by-studio instances for the studio in question. But more to the point, I'm afraid that every time I add a NEW movie from this studio, PVD is going to end up doing the same thing again (i.e. consider the studio as a completely separate entity from the existing instances of that studio, despite the name being spelled exactly the same, and make it so that the studio name cannot be changed or deleted).

I don't understand what's causing this problem in the first place. Why would it matter if a studio name (or any other field) has an apostrophe? And why won't PVD allow it to be changed after the fact?

Aimhere

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Apostrophe catastrophe
« Reply #3 on: September 27, 2013, 09:36:28 pm »
Have you guys tried the latest beta? As I can't reproduce the problem there...
« Last Edit: October 01, 2013, 11:45:19 pm by nostra »
Gentlemen, you can’t fight in here! This is the War Room!

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #4 on: October 01, 2013, 11:03:23 pm »
Have you huys tried the latest beta? As I can't reproduce the problem there...

I've been holding off on the latest beta until it was out of beta...  :)

Guess I'll give it a whirl.

Aimhere

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #5 on: October 02, 2013, 12:15:01 am »
Update: PVD RC 1.0.2.5 won't even open a copy of my database. It doesn't give any error when I try, but it shows an empty database (no records)!!! If I open the Statistics window, it tells me there are no movies and no people.

1.0.2.5 also will not load a much smaller test database I created in the older version (0.9.9.21) to test the apostrophe problem. The test database is just a handful of records, with a studio name containing an apostrophe. [Note: In testing, I managed to get 1.0.2.5 to give me an error message when opening this test file (which I submitted as a bug report in-app). However, if I tell the error dialog to restart PVD, it then opens the file.]

So I tried creating a brand-new test database in 1.0.2.5, with three movies, "Test Movie A" ("B", "C"). "Test Movie A" was assigned the studio "Normal Studio", while "Test Movie B" and "Test Movie C" were each assigned to a studio named "Apostrophes 'R Us" (note the apostrophe). After saving all changes, I went to the "View" menu, and chose "Group by Studio". Lo and behold, there were TWO "Apostrophes 'R Us" studios (both spelled exactly the same way) listed in the tree view.

Once I saw this, I then tried to edit one of the movie records to remove the apostrophe from the studio name. When I saved the changes, PVD then showed that the movie had TWO studios, "Apostrophes 'R Us" (with the apostrophe) and "Apostrophes R Us" (without it). Try as I might, I cannot get the app to remove the studio name containing the apostrophe. (Again, this is exactly what was happening in 0.9.9.21.)

So, yes, the behavior CAN be duplicated in the latest version.

Aimhere

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #6 on: October 02, 2013, 01:11:28 am »
Here is a copy of the test database (as created in 1.0.2.5) demonstrating the problem.

Aimhere

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Apostrophe catastrophe
« Reply #7 on: October 05, 2013, 12:28:52 pm »
OK, I could reproduce it at last. It only happens if "Ignore case" option is enabled for the list values. Will be fixed in the next update, that I currently prepare.
Gentlemen, you can’t fight in here! This is the War Room!

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2709
    • View Profile
Re: Apostrophe catastrophe
« Reply #8 on: October 06, 2013, 05:59:07 am »
OK, I could reproduce it at last. It only happens if "Ignore case" option is enabled for the list values. Will be fixed in the next update, that I currently prepare.

When will a new version ready to update?
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Apostrophe catastrophe
« Reply #9 on: October 06, 2013, 10:54:47 am »
In a couple of days.
Gentlemen, you can’t fight in here! This is the War Room!

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2709
    • View Profile
Re: Apostrophe catastrophe
« Reply #10 on: October 06, 2013, 02:56:54 pm »
In a couple of days.

Great, we look forward to the new version.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #11 on: October 07, 2013, 04:03:20 am »
Looking forward to that myself.

Will this update automatically consolidate all of the identically-named "studio" entries I now have?

Aimhere

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Apostrophe catastrophe
« Reply #12 on: October 07, 2013, 08:42:07 pm »
Quote
Will this update automatically consolidate all of the identically-named "studio" entries I now have?
Well, that's a bit tricky as I would need to check all list values for all fields and correct them. This could lead to a rather lengthy waiting time for all users. I am not sure if it worth it as it seems to me that not so many of them have the "Ignore case" option on AND values with apostrophs. I will do some tests and will let you know.

There is another question: why could not you load the 0.9.9.21 database in 1.0.x? It would be good to have a sample database that reproduces this problem as well.
Gentlemen, you can’t fight in here! This is the War Room!

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #13 on: October 11, 2013, 12:09:03 pm »
Quote
Will this update automatically consolidate all of the identically-named "studio" entries I now have?
Well, that's a bit tricky as I would need to check all list values for all fields and correct them. This could lead to a rather lengthy waiting time for all users. I am not sure if it worth it as it seems to me that not so many of them have the "Ignore case" option on AND values with apostrophs. I will do some tests and will let you know.

As long as it lets me delete the existing studio field value (which I cannot do now!), I can always re-create it. I would hope that PVD would then properly group the movies all under the same (single) studio name.

Quote
There is another question: why could not you load the 0.9.9.21 database in 1.0.x? It would be good to have a sample database that reproduces this problem as well.

I'd like to why as well. Does me no good for you to update the 1.x version if it won't load my massive database (i used a copy made from Windows Explorer, of course, not my actual main database). I'll have to try making a smaller database and see what happens.

Aimhere

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #14 on: October 13, 2013, 08:06:12 pm »
Okay, I figured out why I couldn't load my 0.9.x database into PVD 1.x. The test database was stored in a disk folder containing an apostrophe in the folder name, and while 0.9 could load it from there, 1.x kept internally stripping out the apostrophe, so it was trying to load it from a (nonexistent) location. Once I copied the database to the location where 1.x was looking for it, the program loaded it okay.

See my separate post regarding folders for more details.

(still waiting for that apostophe fix, but I can live without it for now.) :)

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #15 on: October 20, 2013, 12:54:53 am »
I just tried the new version 1.0.2.6 with my database, and find I still cannot change or delete the studio that has the apostrophe in its name.

To reiterate: If I try to delete/clear the "Studio" field's value, the original value comes right back when I save the changes. If I try to replace the value with something else entirely, the movie record winds up having TWO studios shown (the original with the apostrophe and the other value I entered). If I then delete both and save again, I'm back to having the one with the apostrophe.

It does this regardless of whether I edit individual movie records or use the Mass Editor to attempt to make changes. It also doesn't matter whether I have "ignore case" checked OR unchecked in "Preferences/Lists".

As before, every occurrence of this studio's name in my database is treated as a separate entity when "View/Group by/Studio" is selected. I have 43 titles from this studio, so the studio name is repeated 43 times in "Group By/Studio" view.

It's almost as if the apostrophe somehow set some kind of "write protected" status on the "Studio" field when the records were first added to the database, AND also made the database engine treat this studio's name as "unique" for every instance it appears.

Is there anything I can do to fix this?

Aimhere

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Apostrophe catastrophe
« Reply #16 on: October 20, 2013, 01:36:21 am »
Only new records are added correctly. The old ones can't easily be fixed, unfortunately. You can remove those duplicates and fix the database by executing the following SQL statements:
Code: [Select]
CREATE VIEW PRIMEVALUES ("vid", "value") AS
SELECT MIN(EX1."sid") minsid, EX1."value" FROM STUDIOS EX1
INNER JOIN STUDIOS EX2 ON (EX1."sid" <> EX2."sid" AND EX2."value" = EX1."value")
GROUP BY EX1."value"
ORDER BY minsid
Code: [Select]
CREATE VIEW DUPLICATES ("dupid", "primeid") AS
SELECT "sid", "vid" FROM STUDIOS
INNER JOIN PRIMEVALUES ON (STUDIOS."value" = PRIMEVALUES."value")
WHERE (STUDIOS."sid" <> PRIMEVALUES."vid")
Code: [Select]
UPDATE MOVIESTUDIOS SET "sid" = (SELECT FIRST 1 "primeid" FROM DUPLICATES WHERE "dupid" = "sid")
WHERE EXISTS (SELECT FIRST 1 1 FROM DUPLICATES WHERE "dupid" = "sid")
Code: [Select]
DELETE FROM STUDIOS WHERE EXISTS (SELECT FIRST 1 1 FROM DUPLICATES WHERE "dupid" = "sid")
You can do this by starting PVD with -debug command line parameter and selecting Personal Video Database -> Help -> SQL from the menu
Gentlemen, you can’t fight in here! This is the War Room!

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #17 on: October 20, 2013, 04:58:04 pm »
Will this remove just the studio names, or the actual movie records associated with them?


Never mind, I just tried it and it worked.

I don't know if this was the intent of the SQL, but all of the affected movies actually do still show the name of this studio. But they are now grouped correctly with "View/Group by/Studio", which is all I wanted. :)

Thanks again, Nostra.
« Last Edit: October 20, 2013, 05:37:23 pm by AimHere »

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Apostrophe catastrophe
« Reply #18 on: October 20, 2013, 05:50:50 pm »
It will actually fix the studio problem and leave only one Studio, setting it for all appropriate records.
Gentlemen, you can’t fight in here! This is the War Room!

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Re: Apostrophe catastrophe
« Reply #19 on: October 20, 2013, 05:56:14 pm »
Ah, okay.