It's not a bug as far as i know. Just grant it to a mayor.
Would have been nice if you'd explained it better.
People don't understand how the whole title / holding system works.
There is no such thing as a county capital. Not a definite one, anyway. The county capital is just whichever holding is held by the county-title holder.
Take your typical 3-holding county: town, castle, temple. The capital can be any of them. Each of those is a baron-level title.
Now, owning any of those titles, you could also own the county-level title: Count/Sheikh/Chief or Prince-bishop or Lord Mayor/Wali.
You can't be a Count of a county if you don't own a holding in it. But anyone who has a holding in the county could be the count-level title holder.
In your example, you own a Cordoba. You don't own a Castle. This probably happened because, when you conquered, the last owner of the title was a Wali or Lord Mayor. Not a feudal holder.
There is a serious tax penalty to this. You can fix it several ways:
1) Go to Cordoba. Find a baron with a castle in Cordoba. Revoke his baron title. You'll get control of the castle, and the castle will automatically switch to become your county capital there - because you're a feudal character. You can then auto-generate a new mayor for the city, or hand it out manually. The county will now be as normal.
2) Instead of revoking the baron's title, give him the county-level title. He'll do the same thing, take over as Count (or Sheikh) of Cordoba and make a Mayor to run the old city.
3) Find an appropriate courtier to give the city to. He'll run it as Wali or Lord Mayor, and will have a permanent -30 relations penalty with you. But he won't care about crown authority.
The mechanics of titles, especially at the baron- and county- level can be really confusing because 90% of everything is feudal and when you start messing around with prince-bishoprics and grand cities it gets a little counter-intuitive. But no county is permanently anything. The count-level title is entirely fungible and works for any small holding in the county.