Inhalte aufrufen

Profilbild

Thumbs folder doesn't get generated for pictures > 1.000.000


4 Antworten zu diesem Thema

#1 AngKon

AngKon

    Newbie

  • Members
  • Punkt
  • 3 Beiträge

Geschrieben: 03 September 2016 - 08:06

Hello there,

 

First of all i should say congratulations on your product, it's vast and incredible, you are doing an amazing job, every day i find something new that can make my life easier!

 

Now to the topic at hand, i 've been messing with the web app for some time now, because i want eventually to create an e-shop using your platform. I came across a strange problem yesterday and i am baffled, i can't seem to find where to fix it from. So here it is, as the title suggests, when my pictureId counter hit 1.000.000 the thumbs folder stopped producing sub-folders to store thumbs for the extra pics, it stopped at folder number 0999. I presume it should just go to 1000 and continue but this did not happen. I don't know if i messed up somehow but pictures are being saved properly both on my db on the Pictures table and the server on the media folder, they are being properly related with the product on the Product_Picture_Mapping table and so far the thumbs folder generated the sub-folders to keep thumbnails correctly. 

 

I hope you understand what i am saying, i tried to give a description as accurate as i could.

Thank you for your time!

 

UPDATE: After some further digging i found that if i have the multiplethumbdirectories set to true it creates a sub-directory using the first 4 digits of the image that it's trying to create a thumb from to make the directory. So if my picture starts with 0001 then it will try to create a sub-directory with name 0001. Such a directory existed but has been deleted since. I suppose it prevents re-creating it to avoid conflicts.. If i turn the multiplethumbdirectories to false what will happen?Am i going to miss the connection to the current thumbs or will it continue to a singe folder from now on? (seriously, something new every day :D  )


  • GalenKa und Brantot gefällt das

#2 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1002 Beiträge

Geschrieben: 05 September 2016 - 16:58

 

 

If i turn the multiplethumbdirectories to false what will happen?Am i going to miss the connection to the current thumbs or will it continue to a singe folder from now on? (seriously, something new every day  :D  )

 

Your current thumbs will be obsolete. You could delete all subfolders, all thumbs will be recreated dynamically on first hit and saved directly into the Thumbs folder, not in corresponding subfolders anymore. Although, over 1.000.000 items in a single directory is not going to perform very well, which is actually the reason why this option exists.

 

I'm currently investigating why the folder 1000 is not getting created in your case, but until now I can't reproduce this behaviour. I'm on it.

 

Anyway, thanks for the compliments.


Murat Cakir
SmartStore AG


#3 AngKon

AngKon

    Newbie

  • Members
  • Punkt
  • 3 Beiträge

Geschrieben: 06 September 2016 - 09:24

Hello and thanks for the reply, good to know how thumbs work!

 

Sorry it took me so long to respond, i saw your message yesterday, tried to log and respond and managed to lock myself out of my account by entering too many wrong passwords.... afterwards i had to go fast and couldn't wait for the acc to be unlocked,really sorry if i wasted your time.

 

I found a solution about my thumbs folder, or rather i should say thumbs folder had no problem to begin with.

 

Since i wanted to load a huge number of images to the media folder i created a loader program to help me with it, or rather a friend of mine made it and i expanded its functionality... the problem was that when he made the program he figured that pictures need to have a 7-digit id to have a valid path for the web app to "read" them...so his solution was since he was already in the hundred thousand ids due to experimenting with pictures to simply put a "0" in the end of the path in which our loader would save the picture (e.g mysite/media/0"+picture.id.toString()+-0.jpg) so he would get the desired 7-digit path name that the web app would recognize.What he failed to tell me was that pictures have to have 7-digit long names... so when i hit the 1.000.000 mark on the picture id the new images were being saved as 8-digit files (due to the 0 in front) and the web app wouldn't recognize them. It took me ages to figure it out, and i hope i didn't waste too much of your time!

 

Just one last question. I know now that PictureService defines the way pictures are being saved as in

string fileName = string.Format("{0}-0.{1}", pictureId.ToString("0000000"), lastPart);

My question is what happens if pictureid surpasses 9.999.999? (i know the number is ridiculous it's purely hypothetical). If for example i make the string to be 9-digit long what will happen to the existing images?They will not be recognized, right?

 

Again really sorry for not replying sooner and thank you for your effort to help me!



#4 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1002 Beiträge

Geschrieben: 06 September 2016 - 16:22

My question is what happens if pictureid surpasses 9.999.999? (i know the number is ridiculous it's purely hypothetical).

 

Well, I'm afraid in this case we're going out of folders and it won't work anymore  ;)

 

If for example i make the string to be 9-digit long what will happen to the existing images?They will not be recognized, right?

 

Right, they will not be recognized, unless you change affected code parts in SmartStore.NET (ToString("0000000")ToString("000000000"))


Murat Cakir
SmartStore AG


#5 AngKon

AngKon

    Newbie

  • Members
  • Punkt
  • 3 Beiträge

Geschrieben: 09 September 2016 - 08:01

Hello there! Thanks for the reply Murat, i am slowly starting to figure the vastness that is smartstore, even if by a little!

 

I have a brand new problem though ! I was checking the functions for the users on the smartstore, and i encountered an error while trying to recover my password. The e-mail for the password recovery is being send alright, but when i click the link to recover my password i get the following error message

 

The request could not be processed.
Controller: customer, Action: passwordrecoveryconfirm, Reason: Token.

 

After some digging on the forum (my German are really rusty, i have to use google translate nowadays) i found a user that had a similar problem with me but you said it was resolved after update. I went to check just to be safe and indeed the line that was at fault (at least back then) is changed on my version too.

string passwordRecoveryUrl = string.Format("{0}customer/passwordrecoveryconfirm?token={1}&email={2}", _webHelper.GetStoreLocation(),
customer.GetAttribute<string>(SystemCustomerAttributeNames.PasswordRecoveryToken), HttpUtility.UrlEncode(customer.Email)); 

What i can't seem to figure is how the token is being obtained from the web app.

 

Ok, just an update...

 

I tried 15-20 times, and i got 12/15 success. The other 3 the token was just an &amp and nothing else. I haven't been able to figure something different between the cases where the token was successfully generated and those that it didn't.





Auf dieses Thema antworten