# Bulk Actions \> Set Category results in error

**URL:** https://meta.discourse.org/t/bulk-actions-set-category-results-in-error/88694
**Category:** Support
**Tags:** bulk-actions
**Created:** [May 29, 2018, 8:55pm UTC](https://meta.discourse.org/t/bulk-actions-set-category-results-in-error/88694 "2018-05-29T20:55:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![allu](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@allu](https://meta.discourse.org/u/allu)
#### Post date: [May 29, 2018, 8:55pm UTC](https://meta.discourse.org/t/bulk-actions-set-category-results-in-error/88694/1 "2018-05-29T20:55:06Z")

</div>

I am trying to move 30 topics from a subcategory to the parent category by multiple select and then applying Bulk Actions \> Set Category. This results in an error message “Sorry, an error has occurred.”. The category does not get updated. All the data was imported from phpBB. I am using v2.0.0.beta10 +71.

Any ideas?

---

<div class="post-metadata">

### Author: ![tehspaceg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tehspaceg/32/119558_2.png) [@tehspaceg](https://meta.discourse.org/u/tehspaceg)
#### Post date: [May 29, 2018, 9:12pm UTC](https://meta.discourse.org/t/bulk-actions-set-category-results-in-error/88694/2 "2018-05-29T21:12:18Z")

</div>

I ran into this when I imported my topics from NodeBB; there are probably topics with duplicate titles. There is a setting you can enable to allow duplicate topic titles, or you can manually rename them.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 29, 2018, 11:01pm UTC](https://meta.discourse.org/t/bulk-actions-set-category-results-in-error/88694/3 "2018-05-29T23:01:24Z")

</div>

You might learn more about the error by going to `/logs`

---

<div class="post-metadata">

### Author: ![allu](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@allu](https://meta.discourse.org/u/allu)
#### Post date: [May 31, 2018, 9:26am UTC](https://meta.discourse.org/t/bulk-actions-set-category-results-in-error/88694/4 "2018-05-31T09:26:48Z")

</div>

> [@tehspaceg](#):
>
> there are probably topics with duplicate titles

Indeed, I could also verify this to be true in my case by querying the discourse db. I also tried allowing duplicate titles, like you suggested. Unfortunately, this did not resolve my issue. Nevertheless, yours is a great input, and I am likely to run into this down the line.

> [@codinghorror](#):
>
> You might learn more about the error by going to `/logs`

Thanks for pointing out the obvious to me. Indeed, by looking at the logs (duh), I managed to identify my issue. Being a newbie, and not really knowing my way around discourse (yet), I would like to share how I proceeded. Maybe it will be of some help to others investigating similar problems.

My first issue was, that I wasn’t entirely sure what logs to look at. To find this out, I reproduced my error and then executed this command to find which logs under /var/discourse/shared/standalone/log have changed:

`find /var/discourse/shared/standalone/log -type f -mmin -1 -printf '%TY-%Tm-%Td %TT %p\n' | sort -r`

having then identified that the action was going on in production.log, i then tailed it to find this error:

`ActiveRecord::RecordInvalid (Validation failed: Title is too short (minimum is 15 characters), Title seems unclear, is it a complete sentence?)`

Next, I was interested to learn what my (imported) minimum topic length was. I executed the following query against postgres:

`select min(length(title)) from topics where archetype = 'regular' and length(title) < 15`

surprisingly, i turned out to be 1 (bye bye phpBB, I won’t miss you…) 🙄

Then, I went into Discourse admin, set min topic title length to 1, moved my posts, and then reset to 15.

Problem solved 😀

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 31, 2018, 9:49am UTC](https://meta.discourse.org/t/bulk-actions-set-category-results-in-error/88694/5 "2018-05-31T09:49:03Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/0/8/08d40afc4ef48d6da5c7cccc83f1421fbd834162.gif)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:37pm UTC](https://meta.discourse.org/t/bulk-actions-set-category-results-in-error/88694/6 "2024-06-08T12:37:22Z")

</div>

This topic was automatically closed after 2201 days. New replies are no longer allowed.
