Topic List Previews can be broken if multiple topic_list_excerpts exist

(Chris Malone) #1

We have two category pages that refuse to open:

They don’t load past the category header. When you refresh the page, it makes multiple copies of that portion fo the category.

We have several hundred categories and cannot find another one that will not work.

Does anyone see anything that may be causing this?

(Joe Buhlig) #2

Looks like you have the Topic List Previews plugin installed and active on those categories. Is that true?

I’m pretty sure that’s it because I show an error on those pages that @angus might be interested in seeing:

(Chris Malone) #3

Joe thank you! I didn’t put two and two together.

Can you tell me where you view these errors? Is it just in “inspect element”?

(Joe Buhlig) #4

I just opened developer tools on those pages in Chrome and viewed the console.

(Chris Malone) #5

I wonder if there is something wrong in those two categories. Since the plug in is only crashing with those two. I

(Jay Pfaffman) #6

That’s likely. I enabled the plugin globally at the Rails console and I bet that those two categories have two entries in the CategoryCustomFields table, which screws things up.

There were duplicate topic_list_excerpt entries in CategoryCustomFields. Fixed.

This is not a problem for @angus. As far as I know this cannot happen if you manage this with the UX rather than mucking in the Rails Console. I didn’t see any other way to enable the plugin for the 750+ categories, though.

(Chris Malone) #7

Thanks @pfaffman! I’ll let the boss know all is good.