Keyword

User Gallery Relink Images, How?

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago - 9 years 1 month ago #151982 by John Vincent
User Gallery Relink Images, How? was created by John Vincent
Hi,

On our page : clubdevo.com/photos

The links to the photos are gone. Any idea how to restore the links?

The photos are still on the server. And I can see them in the folder.

Thanks,

John
Last edit: 9 years 1 month ago by John Vincent.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #152009 by Krikor Boghossian
Replied by Krikor Boghossian on topic User Gallery Relink Images, How?
Try enabling the item's image in category listings.
This option is located in the category's settings.

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152055 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
So help me out here

K2 uses a folder called cache to store different sizes of images. But this is not like a cache on a browser. I moved some of the files from this folder to gain severer space and only after I did some reading reading realized that i needed this cache folder.

Is this correct? and if these files are missing then my entire gallery is just not going to work

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #152079 by Krikor Boghossian
Replied by Krikor Boghossian on topic User Gallery Relink Images, How?
If you moved these files around, then K2 will not function properly.
The /cache/ folder contains the items' images.

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152088 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
Ok. So thats what happened. I deleted some of the files because I and my host company thought they were "cache"

So this is a very misleading name for a folder. Don't you think?

In any case I am not sure what to do. I found this

www.joomlaworks.net/forum/k2-en/34155-solved-k2-image-cache-rebuild?start=10#142023

Do yo know if it work? Or if you have some way we can recreate the cache?

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152097 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
I need to access this file

j3test.ponyack.com/media/items/K2/rebuild.php

But the website keeps asking me to login. How do I bypass this in K2

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #152109 by Krikor Boghossian
Replied by Krikor Boghossian on topic User Gallery Relink Images, How?
Kudos, you found the extension.
I have not used it but users are really happy with it.

You need to run it via a cron job or thought the console.

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152112 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
I am running it now but I am getting some warnings. I guess I need to reach out to other members and see how it worked for them

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #152123 by Krikor Boghossian
Replied by Krikor Boghossian on topic User Gallery Relink Images, How?
What warnings are you getting?

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152127 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
This is 1 of 4 warnings all the same just the line number chganges

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /home/ianshawn/public_html/administrator/components/com_k2/lib/class.upload.php on line 2977

The line numbers are: 2190 | 2977 | 3004 | 3022

I emailed the developer of the script but I feel like that is a shot tin the dark

We are running Joomla 2.4 and K2 2.6

I know we need to update but this is custom site that was build years ago and developers are long gone. So its a problem that I inherited as a favor to a friend. So much for good deeds .

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152135 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
So I did some poking around and I found this

stackoverflow.com/questions/25391717/preg-match-compilation-failed-invalid-range-after-update

I am not s PHP coder so a lot of this is beyond my scope

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152136 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
Line Number Update.

They are:

2910 | 2977 | 3004 | 3022

Sorry for the confusion

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #152140 by Krikor Boghossian
Replied by Krikor Boghossian on topic User Gallery Relink Images, How?
I would suggest posting this issue in Github to see if the extension's developer has an update or a solution.

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152141 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
I edited a line in code 2977

NEW code : "/^([\.\-\w]+)\/([\.\-\w]+)(.*)$/i" REPLACED : "/^([\.-\w]+)\/([\.-\w]+)(.*)$/i",

And now the SSH console is showing no errors and SUCCESSFUL images being created.

So far so good

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #152178 by Krikor Boghossian
Replied by Krikor Boghossian on topic User Gallery Relink Images, How?
Kudos :)
Regular expressions were never my strong point.
How about doing a PR in github.

Please Log in or Create an account to join the conversation.

  • John Vincent
  • John Vincent's Avatar Topic Author
  • Offline
  • Senior Member
More
9 years 1 month ago #152184 by John Vincent
Replied by John Vincent on topic User Gallery Relink Images, How?
I have no idea what expressions are. lol

I just copy and pasted these into the code until the warning stopped. I really am just a designer but since I also host websites I have had to learn the hard way how to manage a server.

What is a PR on github

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #152277 by Krikor Boghossian
Replied by Krikor Boghossian on topic User Gallery Relink Images, How?
It's a Pull Request, you change the repo's code and make a request (so the devs can see it) to be included in the main repo.

As for regex, you asked for it :)
php.net/manual/en/reference.pcre.pattern.syntax.php

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum