10 years ago
5
Topic
Hi,

I have been using Seblod for one of my projects. The issue that i have run into recently which i am unable to solve is that, when I put a really long image title to be displayed in colorbox, the image is not uploaded at all, especially when the description text is also set. At times, the file name is appended to the image title in a strange manner and a link is generated out of it. The result is that the colorbox shows error. When I use firebug to check the output, it is seen that the title is exploded as attributes of the tag containing colorBoxTitle. I tried finding out about the error, but of no use.
The values are set reasonably appropriately as i have other content types and forms where i am using the image upload field with the same settings, and they are working fine.

This issue arises, when the title field exceeds a certain limit, which i am not sure.(here i have around 300 characters long title text, client is very specific about the title).  When the title or description text is short, say 50-60 characters, it works absolutely as expected, with no errors what so ever.

Kindly, if anyone could, please let me know, how could this issue be solved. How to increase the maxlength of title field, if is the same..

Alternately, i have implemented this using upload_image.php's field rendering code, but i am not really sure, if it is the right approach.

Urgent help needed.

Thank you all for going through such a long post. Any help or suggestion is greatly appreciated.

Regards,
Vimal
Get a VIP membership
10 years ago
1
Level 1
have you check database table? where title is stored - if it is 256 chars long - change the type or change database limitation
10 years ago
0
Level 2
Thanks for your response terveg, but i don't think, except for few instances, i am exceeding 255 characters, as the whole string is displayed as attributes of the tag containing it. For  example suppose, my title is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis".
when i save the field, the title field gets updated with text like this "name_of_the_image.ext:image: ""Lorem ipsum dolor sit amet, consectetuer adipiscing el"..
The preview breaks of.
And when you inspect the element using firebug, it looks like this:

[code]<a id="something" [other attributes after it] dolor="" sit="" amet="" consectetuer="" adipiscing="" elit=""... >....</a>[/code]

So basically what i am highlighting up is, at times, yes when i exceed the 256 limit, it does not save the image, title and description at all, but when the title is fairly long, but, say within length of 256, it is broken up strangely.  I went through the upload_image.php file, i did not notice anything strange there, but when it is happening, it leaves me in a fix, as the image field in question is displayed on a catalog of products, and is the only way  through which a user can see a particular product. And when this error happens, description also gets destructed... so basically leaving a vacuum in my product catalog.

And honestly speaking, i am not really aware how the title is saved (image_title) in Seblod.  Could you or anyone else, provide me with inputs where to find this field.

Thanks Terveg once again, for finding out time to respond to my post, i would try out your solution too, if i could figure out the exact db field.. :)
Thanks you very much.

Regards,
Vimal
10 years ago
1
Level 1
Hi Vimal,

I'm not sure what causes this error. As far as I know, the image description gets stored as JSON value in introtext field but may depend on storage options that you use.

But as a workaround you could set up your image and description text as a group x field. That way you could use a normal text field to store the image description which should avoid those errors.
10 years ago
0
Level 2
Thanks for your response gebeer. Actually this is how i have implemented it for one of the categories in the catalog, where i was facing issue. But it is not group x field, it is a simple text input field, and i am rendering it as title in the custom template. I was looking for the solution because, there are 15-20 content types with similar fields, a solution for this would have helped a lot. Also, storage option is same as suggested by you.

Thanks a lot gebeer for finding time to respond to it.. And other suggestions are always welcome..


4229 Posts
Kadministrator
10 years ago
0
Level 1
Hi,

 please report this issue on the tracker http://www.seblod.com/resources/tracker
Get a VIP membership