Results 1 to 5 of 5

Thread: Reserved Words for field names in OR

  1. #1
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default

    Just a heads-up for anyone before they spend a lot of time figuring out why things won't completely save sometimes when adding or modifying a listing.

    Recently I was setting-up a site and one of the fields I created in 'Edit Listings Template' had a Field Name of "owner" .

    Try as I might, when adding new listings or editing existing ones, I could not get anything to save in the "owner" field.. All other fields contained the correct data, but "owner" was always blank.

    After looking at the code I noticed that the variable $owner is used as the user_ID for the listing, at least for 'listings_edit.php'..

    After changing the Field Name to "own" I was then able to save data to the field.

    There are appearantly some reserved words like "owner" throughout the system that cannot be used as field names and/or other things. Should any of you run into the same headache, check the source-code of the file in question for a variable with the same name as the field that won't save data. If you find one, there's your problem... Change your field name and that should fix it.

    Maybe when Ryan gets back from his vacation :roll: he can check v2.0 for any "sensitive" variable names, and isolate or rename them accordingly...

    Beerz!
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

  2. #2
    Join Date
    Mar 2004
    Posts
    83

    Default

    nice catch sandking, i do believe this one is a keeper

    thanks for the heads up, this will probably save a few of us a bit of sanity in the course.

  3. #3
    Join Date
    Jun 2004
    Posts
    1,067

    Default

    SK,

    This should be fixed in 2.0. I will make a note here to double check as i get things worked out more.

    Thanks,

  4. #4
    Join Date
    Mar 2005
    Posts
    22

    Default School District reserved, too

    I believe this one got me, too, with "School District". Thanks for the help.

  5. #5
    Join Date
    Feb 2005
    Location
    France
    Age
    35
    Posts
    42

    Default

    I also noticed this when I first used Open Realty... I d'ont think it is worth fixing this, but It would be nice o have a notice on that page...
    Under works :
    http://www.propertieswebsite.com
    Comments appreciated...

    A website for one Property See example here PM me or email me contact@propertieswebsite.com for details.

Similar Threads

  1. Reserved template keywords - TODO 2.0
    By Anonymous in forum Bugs (CLOSED)
    Replies: 0
    Last Post: 07-31-2003, 12:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •