Does CB store the DB prefix somewhere?

12 years 4 months ago #186144 by RCheesley
Does CB store the DB prefix somewhere? was created by RCheesley
Hi folks,

I migrated a site from 1.5 to 1.7 and we are now using a new prefix for the database tables, but now the custom fields are failing to store.

When I ran the DB check in CB Tools, it is still looking for the old prefix - despite the fact that all the CB tables are using the new prefix.

Where is this stored? The rest of the site is working perfectly fine so I assume that CB must have stored/hard coded it somewhere but I can't find where that might be. It seems to be specifically related to the extra fields table.

Joomla! version 1.7.3
CB version 1.7.1

Ruth

Ruth Cheesley
Joomla Specialist
Virya Technologies Ltd.

Please Log in to join the conversation.

12 years 4 months ago #186149 by RCheesley
Replied by RCheesley on topic Re: Does CB store the DB prefix somewhere?
OK I've tracked down where this was - in the extra fields table the database prefix is hard-coded under the 'table' column - why?

If I try using #__ (which would be the more sensible thing to use, no?) it then reports that the field is not present in #__comprofiler so I manually added it. Seems to be working now, naughty hard coding of prefix though :(

Ruth

Ruth Cheesley
Joomla Specialist
Virya Technologies Ltd.

Please Log in to join the conversation.

12 years 4 months ago #186177 by krileon
Replied by krileon on topic Re: Does CB store the DB prefix somewhere?

Where is this stored? The rest of the site is working perfectly fine so I assume that CB must have stored/hard coded it somewhere but I can't find where that might be. It seems to be specifically related to the extra fields table.

Isn't stored anywhere, it's done through Joomlas API from CB.

OK I've tracked down where this was - in the extra fields table the database prefix is hard-coded under the 'table' column - why?

It shouldn't be. It should be #__, some migration tools have a tendency to replace all occurrences of #__ regardless of location. Replace them with #__ and you shouldn't have any further issues.

If I try using #__ (which would be the more sensible thing to use, no?) it then reports that the field is not present in #__comprofiler so I manually added it. Seems to be working now, naughty hard coding of prefix though

I would need phpmyadmin access to see what's broken as the migration you used probably replaced all #__. If you'd like I can take a look, please PM phpmyadmin login credentials and backend super administrator access.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 4 months ago #186191 by RCheesley
Replied by RCheesley on topic Re: Does CB store the DB prefix somewhere?
Hey there,

Just to clarify, every other field had #__ except for the custom fields, which all had the original database prefix hard-coded. Every other field worked perfectly, and when I changed the database prefix in the custom fields to #__ and then created the missing fields in the #__comprofiler table (which were missing) it worked fine.

As a bit of history, this site was a 1.0.x site which was migrated to 1.5.x and then 1.7.x - so it's going back a long way - but the first time we had any problems with this was when we migrated to 1.7.x. The database prefix being used was for the 1.5.x site.

I could understand it if *every* instance of #__ had been replaced by the migration, but just one field, in a table which contains loads of other references to tables? Seems kinda odd. That's why it led me to wonder if at some point in the past, this value (referring to the comprofiler table) had the database prefix hard-coded in the database. I checked in other installations of CB and couldn't see any with similar instances, so wondered if it was an olddddddd historical thing from the depths of time!

Ruth

Ruth Cheesley
Joomla Specialist
Virya Technologies Ltd.

Please Log in to join the conversation.

12 years 4 months ago #186192 by krileon
Replied by krileon on topic Re: Does CB store the DB prefix somewhere?
I've no idea, sense past 3 years that I am aware its always been #__. At any rate glad your issue was resolved! Was this field perhaps created by a plugin rather then through CB > Field Management?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.209 seconds

Facebook Twitter LinkedIn