Repeater on live site showing blank item

I have my dataset configured to show two items at a time based on the filter that I have set.

Filter : Sold is not true

I have set these filters through the dataset itself.

On the preview all is working fine, I can see no empty repeater items


However on the live site, I get this:

The only code I have on this page, is the following:

\\ This is for the UnderContract banner to appear when a boolean
in the database is selected \\

$w.onReady(() => {
  $w("#dynamicDataset").onReady(() => {
    $w("#repeater3").forEachItem(($w, itemData, index) => {
      if($w("#text155").text === 'true') {
        $w("#button6").show();
      } else {
        $w("#button6").hide();	
      }
    });
  });
});
 
 \\This is simply to view more items when view more button selected \\
let numberOfItemsToDisplay = 2;  
let increment = numberOfItemsToDisplay; 

export function button4_click_1(event, $w) {
	let count = $w("#dynamicDataset").getTotalCount ();
	numberOfItemsToDisplay = numberOfItemsToDisplay + increment;
	if (numberOfItemsToDisplay >= count) {
		$w('#button4').hide();
	}
}; 

I have made sure sync my database with the live site, the dataset permissions are read only & I have cleared my cache on my browser (I have no idea if that is relevant).

Any help would be greatly appreciated!! Pretty Pretty Please.

:slight_smile:

Hey Hannah,

Seriously? “Pretty Pretty Please”, but what about “with sugar on it”?

Welcome to the Wix Code forums. I was able to read the site’s URL and I took a peek inside. I see that in your Live Resale database collection, you have a blank line:


Is it possible that the blank line is causing the second repeater item to be empty?

Thanks,

Yisrael

You definitely get all the sugar !!

Ahh thank you so so much!
It was literally that simple of a fix & here I was racking my brain for what seemed like hours hehe!

I was syncing my database to the live however I was only copying not overwriting so the blank space must have been hiding there for a little while hehe

Thank you once again !!

Hello!
I have a similar issue, without any blank fields in the data collection!

Everything looks good in the preview (img 1), but then on the live site there is a blank item at the top of the repeater (img 2)
 Any suggestions? Also pasting the code for the page.

Thank you!

import wixData from 'wix-data';
$w.onReady(function () {
     $w("#biobutton").onClick(async (event, $w) => {
 const bio = await wixData.get('Team', event.context.itemId)
  $w('#textgroup').show();
  } );
} )
export function closebutton_click(event, $w)
 {
  $w("#textgroup").hide();
}

Hi Helena,

The sandbox (preview) database is not the same as the Live database. You can sync your sandbox to the Live database and you’ll then get the same results in Live as in Preview.

Hi Yisrael,

Thank you! However, syncing doesn’t do the trick
 Any other ideas? :slight_smile:

Helena

Please post the URL of your site. Only authorized Wix personnel can get access to your site in the editor.

Thank you!
It’s http://borders-territories.space
The concerned page is ‘Team’.

In the Live database, row 2 is empty:

This would cause a blank repeater item.

1 Like

Hello again,
Thanks for checking - how come it doesn’t sync correctly? Should I pick another option than the top one (copy to
)

I suspect that it is syncing correctly. The “sync from sandbox to live” copies all records from sandbox to Live that do not already exisit in Live. It does not overwrite or delete entries in the Live database.

Alright, good to know! Thank you so much!

THANK YOU! It didn’t occur to me that I had to go to “Edit Live” to delete it. Saved me hours of fretting.

1 Like

Hello everyone,

I have the same problem about Repeater : in Preview mode, it’s fine, but in live Site the Repeater doesn’t appear


I’ve tried to sync my database again, to add new Repeater, to copy a repeater that works good on the other page, etc, but I couldn’t find a problem.

Please note that in the repeater that doesn’t work, there are: button linked to pdf file, 2 texts linked to texts, and the containter to image file (optional).
I wanted to leave container in one color and not connected to database, but I read your comments so I connected as well to image file.

The page where the Repeater doesn’t work:

(connected to the database “REPORTAGES”

The page where the Repeater works good:

(connected to the database “GALERIES-PHOTOS”

I’m still waiting to transfer my domain
 :slight_smile:

Thank you in advance for your help!!
Best regards,
Irhad

Hi,
I have been using my code for sometime now and suddently I get additional blank lines in my Collection and it creates blank lines on my repeaters.

I checked every steps of my code and also tried to reproduce the problem without any luck.

Seems that something has changed that creates this could be my code but I had this code working for sometimes without any issue.

Thought I reported it too.

Pierre Lacasse

You most probably have blank lines in your data collection. You need to check the code where you add entries to the collection.

@yisrael-wix Hello Yisrael, can you help me with my issue mentioned above please? I didn’t use the code, as my Repeater and database are simple (and because I dont really know how), but anyway, on the first page the repeater is good, and on the second one it won’t appear on the live site. In preview mode everything seems to be ok. The URL is: https://raidsglobetrotter.wixsite.com/raids-globe-trotter/reportages
Thank you in advance. Irhad

Yes I found blank entries in my collection but I am still testing and these happened by itself since I am now working on a copy of my site. So nobody interact with the site

The blank rows aren’t just going to magically appear. You must have done something in your development or testing that caused the rows to be added to the database collection.

@irhadkatana You need to change the permissions. I got it to work with the following:


You’ll need to decide on what the best level of permissions is for your site and visitors.