ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Relationships table losing data

June 29, 2010 12:38pm

Subscribe [5]
  • #1 / Jun 29, 2010 12:38pm

    Russ Back

    142 posts

    Hi

    I have a relationship field between a weblog and gallery entries but every now and again the rel_data fields in the table are emptied.

    When I go into the edit entry screen, the relationship is showing in that the relevant gallery entry is selected, but when I look in the the exp_relationships table in the database, the rel_data field of every entry is blank.

    This has happened a couple of times in recent days and I’ve noticed it as I rely on the rel_data for an add-on.

    Is there a know situation where these fields would be cleared?

  • #2 / Jun 29, 2010 5:42pm

    Ingmar

    29245 posts

    What version and build of EE are you using? Any third-party add-ons?

  • #3 / Jun 30, 2010 4:27am

    globalfit

    11 posts

    Sorry, I should have added that in the post: 1.6.8. Third party add-ons are:

    Modules:
    - Deeploy Helper
    - Freeform

    Extensions:
    - LG Addon Updater
    - LG .htaccess Generator
    - Gypsy

    Plugins:
    - Markdown

    Other than that, I have a custom plugin that uses the rel_data field but it’s a SELECT statement - there is no UPDATE, INSERT or DELETE.

  • #4 / Jun 30, 2010 5:14pm

    Russ Back

    142 posts

    I’ve searched through the code and it appears that the function clear_caching in core.functions.php clears the rel_data and reverse_rel_data fields.

    Is there a reason why this data is cleared from the database when the cache is cleared?

  • #5 / Jun 30, 2010 5:43pm

    Ingmar

    29245 posts

    That is a very good question—for our devs. Let me forward this; thanks in advance for your patience.

  • #6 / Jun 30, 2010 6:09pm

    Ingmar

    29245 posts

    How is the cache getting cleared in the first place? What action, specifically, are you taking to clear it?

  • #7 / Jul 05, 2010 5:21am

    globalfit

    11 posts

    I’m not doing anything consciously - just the usual content editor tasks of add,edit,delete entries in weblogs, galleries, categories, etc.

    As I said in my post above, when I search the code for the rel_data field the only reference to it is in the clear_caching() of core.functions.php. So I’m not doing anything personally, and none of my add-ons are either - it’s core code that’s clearing it. If you look at the function you will see that rel_data and reverse_rel_data get set to an empty string in the logic block. My question is why do you do this and in what circumstances - I would have thought you need to retain the data at all times and if anything, delete the whole record, (not just the rel data) when any related entry is removed?

  • #8 / Jul 05, 2010 4:09pm

    Ingmar

    29245 posts

    I forwarded your questions to our dev team. Thanks for your patience, globalfit.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases