Support forums : You can see the bug

FM in Pop-up SQL error

A red message that stops the whole page from loading; a full page, but a message that looks like it came from the server; a red box with red text that we made: All of these are bugs you can see, so report them here. kthxbai :)

Moderator: Dracones

Forum rules
Can you copy/paste the error message, or do a screenshot that shows what is wrong? If not maybe you've got a "you can sense it" bug.

FM in Pop-up SQL error

Postby Kimberly » Sat Jan 28, 2012 12:23 am

This may be due to migrating from that other app to QP. Not sure what is happening here so I posted here. It occurs in the browse view of the FM in a pop-up but not in the regular Files section browse. Therefore, this must be due to code that is unique to the FM in a pop-up mode. I have yet to look at the code here.

Oh, this is not version 0.0.0; I installed the latest trunk, 05-Jan-2012, so perhaps this is due to a recent change in the branches.

Code: Select all
MySQL error!

Duplicate entry 'collection-2-Iris_1.jpg' for key 2(Errno=1062)

Your query: DataObject::dbinsert()

INSERT INTO secret_corners_blog_files (file_root_type, file_root_ID, file_path)

VALUES ('collection', 2, 'Iris_1.jpg')


I am not familiar with the FM in a pop-up SQL accesses; I guess I should get familiar. Why are we doing an insert into the database in browse view? Or is it not suppose to be doing an insert and it is trying to insert the file iris_1.jpg and finding it already exists?
Kimberly
Dracone
User avatar
 
Posts: 842
Joined: Mon Jul 19, 2010 4:44 pm

Re: FM in Pop-up SQL error

Postby EdB » Sat Jan 28, 2012 5:03 am

Does Iris-1.jpg already exist in the database? I'm guessing it does ... duh.

When you upgraded did you wipe out all the other app's files? Not sure why it might matter, but I haven't heard of this in any other situation so I'm reaching for anything here ...
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: FM in Pop-up SQL error

Postby Kimberly » Sat Jan 28, 2012 6:21 am

EdB wrote:Does Iris-1.jpg already exist in the database? I'm guessing it does ... duh.

When you upgraded did you wipe out all the other app's files? Not sure why it might matter, but I haven't heard of this in any other situation so I'm reaching for anything here ...


I think I did wipe out all the other files, and then uploaded my files so that they would be in place for the blog posts. However, maybe I didn't. Wait, that should not make a difference, I have ftp files up to the website and the file manager had no problem dealing with them even though they were not uploaded through the file manager. Still, that was with that other app. I could wipe the media folder and then upload my files again.

Yes, iris-1.jpg exists and is a photo that I uploaded.

This is only happening with the browse view in the FM in a pop-up. I have not looked at the code yet. Will try reloading the media folder.

I also got a 403 error a couple of times that then went away. Then I notice that one file is not displaying due to a 403 error (permissions) That is strange as well.

Speaking of permissions, what should the permissions be on the media folder? Currently it is 755.
Kimberly
Dracone
User avatar
 
Posts: 842
Joined: Mon Jul 19, 2010 4:44 pm

Re: FM in Pop-up SQL error

Postby EdB » Sat Jan 28, 2012 1:22 pm

755 should be good, but that is a function of the server - not the app.

By any chance is that file in the same path it used to be in relative to the installation's root? Just guessing, but if the file "moved" compared to what the database thinks AND core doesn't want the same name twice then it would be trying to add "iris" to collection 2 and is upset because "iris" exists in collection 1 according to the database.

Typing is hard today. Dunno why.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: FM in Pop-up SQL error

Postby Kimberly » Sat Jan 28, 2012 3:22 pm

I noticed in the settings that the default value for file manager when it creates new folder is to use 775.

Yes, I placed QP in the same folder structure as the other app, and then uploaded the media folder. I renamed the current media folder and then uploaded it again. Same error stopping at the same file.

Why are we trying to insert into the database? Is it reading the files, checking to see if an entry exists for that file, and if not insert the information on that file into the database? As I said, I have not looked at the code. If that is the way it works, then most likely a corruption occurred somewhere during the upgrade. It may be simple to fix by just deleting the entry from the database and let file manager in a pop-up insert it.

What I don't understand though, is why it is happening in the FM in a pop-up and not the regular file manager.

I am seeing three files with a 403 permission error, don't know why that would be. I am going to check the permissions on the files and if they are the same as the other files then that would be strange.

Upgrading from b2evolution to Quam Plures may not always be a smooth ride.

Edit Files have permissions 644. The three files that FM can't read, returning a 403 have permissions 644. So if FM can read the other files, why can't it read the three that are reporting 403 since all files have the same permissions set?
Kimberly
Dracone
User avatar
 
Posts: 842
Joined: Mon Jul 19, 2010 4:44 pm

Re: FM in Pop-up SQL error

Postby Kimberly » Sun Jan 29, 2012 5:47 pm

The SQL error stems from the fact that for some reason during the loading of the files into browse view, it tries to insert into the database; since the file information already exists, it kicks out the duplicate entry error. It is not suppose to be trying to insert into the database.

I decided to replace the entire "files" folder (qp_inc/files) from the current trunk with the one from QP v.0.0.0. Going back to the FM in a pop-up, the error disappeared. Furthermore, the 403 error on three files also disappeared. This leads me to believe that one of the changes that was made to the files code contains a bug. I guess the best way to try and track this down would be to look at the diffs?

I had to redo my computer due to a hard drive problem, so I need to get all the things back in place to handle branches

Edit Just to be sure that it was not just a first use of the FM in a pop-up after migrating to QP, I reinstated the current trunk files folder. The error reappeared. It stops at exactly the same file each time.
Kimberly
Dracone
User avatar
 
Posts: 842
Joined: Mon Jul 19, 2010 4:44 pm

Re: FM in Pop-up SQL error

Postby EdB » Sun Jan 29, 2012 6:01 pm

Interesting ....

Just played a bit with "zip updated to latest trunk" and can't duplicate the problem. I tried "files" on a new item and editing an item, and "link/attach" when editing an item. In all cases I didn't see any sql error. Problems that are hard to reproduce suck :(
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: FM in Pop-up SQL error

Postby Kimberly » Sun Jan 29, 2012 8:11 pm

I had installed QP 0.0.0 on the test server. Then I did the upgrade using the latest trunk to test the upgrade script. I first tried to upload the old a files folder to the server, then go into blog setting for A and switch to that folder. It keep giving me an error about illegal folder name. How can naming a folder a be illegal? So, I renamed the folder to the default folder for Blog A and used the default setting. I was able to go to write, click on files, and it loaded in the files for that folder. However, of course there were no entries in the blog files database table so this really proves nothing.

Maybe this problem is from the way I migrated. I should have installed QP v.0.0.0, then run the evoconverter, then the upgrade to the latest trunk. I installed the latest trunk, then did the migration. Perhaps that caused the problem. Resorting back to the QP v0.0.0 files folder works.

I think I will install QP v0.0.0, upgrade to the latest trunk, and then try importing the database tables to see if it works. I could just start over, but I lose any new comments and views and such that have been added since I did the migration.

I need to isolate the parts of the code that just deal with FM in a pop-up and exclaim it versus the regular FM since the database error only occurs with the FM in a pop-up. Although the strange 403 error on three files exists in both. What files do I need to examine for this?
Kimberly
Dracone
User avatar
 
Posts: 842
Joined: Mon Jul 19, 2010 4:44 pm

Re: FM in Pop-up SQL error

Postby Kimberly » Mon Jan 30, 2012 9:25 am

I installed v0.0.0, uploaded my files, imported database, got error that the db_version was wrong. Changed it to 0, app runs. However, still have three files with 403 error (changed one to 777 and it still gave me a 403, 777 give everyone access) So why? No SQL error. Uploaded the latest trunk, ran the upgrader, it seems to work OK, Log in, go to write, go to files, and the bleeding SQL error is there. Only in the pop-up, although the 403 error on three files exists in both.

It does not need to be inserting anything, it was just reading in the files.

Evidently, one can not install the latest trunk, and then use the evo converter. So, I guess my stupidity at least lets everyone know if you are going to migrate from b2evo, you will have to do it in stages. Evidently this was caused by me installing the trunk, and then running evo converter. Can't think of anything else.

Would someone please tell me where the file manger in a pop-up exists. This only happens when I have the new version from the trunk, but I have no idea where to go hunting.

The problem is that my blog has been running, so I can not go back, I lose updates to the blog. This sucks worst than a 50 cent whore.

Edit Oh, the file that QP won't load from the file manager, that gives 403 error? I just typed the address into the web browser and it loaded up perfectly fine, so that means that is a QP error, not a server error.
Kimberly
Dracone
User avatar
 
Posts: 842
Joined: Mon Jul 19, 2010 4:44 pm

Re: FM in Pop-up SQL error

Postby EdB » Mon Jan 30, 2012 12:43 pm

The files that are at issue here? Delete them via regular file manager then unattach them from items, and then re-upload them and reattach, just to see if that "cures" the problem. I would verificate that the file is actually deleted from the server and that the database entries are removed.

The file manager in popup is the exact same file as file manager in a regular. I never did like that - felt it should be it's own file, but such is life. Not that I know off the top of my head which file that is, but I'd go with files.ctrl.php as a starting point.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Next

Return to You can see the bug

Who is online

Users browsing this forum: No registered users and 1 guest

cron