Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Vanguardian on
I have a view that is displaying a 2 column Grid of the field Content:Image and for some reason the number 1 is added within the "field-content" div after each picture.
I have tried adding filters, but nothing removes it.
Everything displays perfectly otherwise, and I'm so many hours deep trying to resolve this last issue. Any help is GREATLY appreciated.
Comments
I would check the
I would check the configuration for the field (in the view) and make sure there is not a '1' in one of the options that should not be there.
Thanks for the reply.
Thanks for the reply.
Even when I create a view from scratch with all default values and add nothing but a single field of "Content:Image", I still get an output that has the "1" appearing to the right of the picture prior to the default "," separator.
You've probably accidentally
You've probably accidentally added a 1 into the code of one of your files somewhere, before an opening php tag. This will print the 1 to the screen. It may also be in settings.php.
That's what I was thinking
That's what I was thinking and I ran through pretty much every .php file I ever edited or opened since I began development and I couldn't find any errors.
I thought it would be easy for me to narrow down the cause by finding out what div it was contained in, but that didn't really help me much. Any ideas as to which file is responsible for outputting content in the area below.
It's not in settings.php, page.tpl.php, any guesses?
That looks like it's part of
That looks like it's part of a View. Do you have any views templates? If not, maybe in your views settings?
Rewrites?
If you are using a rewrite in the views, it may be there.
Drupal Development and Consulting.
Thanks again for the
Thanks again for the responses, but still no go.
There are no rewrites in the view, and regarding templates, I didn't and really never use any. In an attempt to fix it a while back, I created a template from an existing view that I have which is functioning correctly and created a template out of that in hopes of removing any faults within the view itself. No go on that.
I believe that somehow the 1 is attached to the content type itself because once I change the content type to display "Content:Slide" (which is a content type I created for my slideshow images) and delete "Content:Image" the 1s disappear and are not appended to those images. All of the other view settings are exactly the same.
I am currently displaying "Content:Image" in my posts with Nivo Lightbox with multiple fields enabled into a grid of 6 columns. I cant imagine this actually attaching anything to the image itself, but maybe someone else can shed some light.
Did you sort this out finally
Did you sort this out finally?
Anyone else willing to take a
Anyone else willing to take a guess?
I'm getting the same in
I'm getting the same in different views.
It's happening in a table view to me, but I've tried all other options,grid, html list, unformated list, all with the same result.
I only use one image but if I trie with more than one it only shows after the last of the images.
see image here
What is happening?
Found how to make it
Found how to make it dissapear here
http://stackoverflow.com/questions/28520690/drupal-image-in-view-followed-by-1
Has to do with the Grid Field Formatter module