Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

Changing the database key

  • Mike
    Mike
    Senior Member 130 points
    July 29, 2013 at 7:58 pm

    I had a database key for the website url set to
    url
    but it never seemed to save the url, so I thought perhaps I should change the actual database key.

    Which you can do under edit custom field key as well as it seems you can change the key on the individual listing edit page

    I am thinking that this could be a problem if an admin gets in there and changes the keys.

    Plus when I changed the key for URL to website_url and tried to find it on the list of custom keys for Shrink the web, it stays at url on that drop down list.

    So I am thinking that even though it appears you can change the key in the above 2 places, that it does not really change.

    If someone could clarify this for me I would appreciate it.

  • Ian
    Ian
    Super Guru 1,200 points
    July 29, 2013 at 9:12 pm

    On the listing pages it should be just the name not the key, I think.

    Edit. Sorry didn’t see that this was responsive theme….

  • Mike
    Mike
    Senior Member 130 points
    July 29, 2013 at 9:19 pm

    Exactly,
    however currently you can change the key in both the custom fields edit, and on the individual directory listing edit page. When you do what happens is that the next record that gets created includes the field as a new field along with the old field staying there.
    So it has the effect of adding a new field to the database, which makes sense as the table already exists, but to the user it appears that the field key can be changed.

    Probably need to eliminate the ability to change the key once their are data records present or a global setting to “Lock custom field database keys” so that once the final design is set and the test records are deleted from the database and it goes live you could lock it so admins don’t accidentally edit a database key value and mess up the database.

  • Mark Fail
    Mark Fail
    Super Guru 12,822 points
    July 30, 2013 at 3:16 am

    changing a key after its already been used by some posts will not make a difference to existing one, it will simply use the new for for newly created listings so if you must change, do it before your site goes live.

    Plugins like shrinktheweb will have their own setup options for which key you use.

  • Mike
    Mike
    Senior Member 130 points
    July 30, 2013 at 4:34 am

    Perhaps I am worrying about something that will never happen, but if an employee happened to change the key for the field on the listing edit page it would cause an issue. Not sure why the actual key is editable on the listing edit page.

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 30, 2013 at 8:37 am

    Why would you allow employees to edit any of the theme sections?

  • Mark Fail
    Mark Fail
    Super Guru 12,822 points
    July 30, 2013 at 9:12 am

    Mike if the issue ever comes up ill look into it further, at the moment i dont think it would ever be an issue.

  • Mike
    Mike
    Senior Member 130 points
    July 30, 2013 at 1:10 pm

    @Richard, the custom field database key can be changed on the listing edit page, I certainly would want employees to have access to editing fields on a listing.

    @Mark, that is fine I am sure you are swamped with other more pressing issues. Wow I think that was a pun! :)

  • Mark Fail
    Mark Fail
    Super Guru 12,822 points
    July 31, 2013 at 1:53 am

    lol

Viewing 9 posts - 1 through 9 (of 9 total)