1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug ACP Search Result for removed addon variable

Discussion in 'Resolved Bug Reports' started by Marcus, Nov 2, 2013.

  1. Marcus

    Marcus Well-Known Member

    I removed my addon but the conversation_user_x variable is still displayed when I search for "conversation" in ACP (Elastic) Search. Is there a way to remove this from search results?
  2. Chris D

    Chris D XenForo Developer Staff Member

    Not a bug.

    Your add-on uninstaller needs to remove the content from the search index.

    $db->delete('xf_search_index', 'content_type = "your_content_type"');
    Marcus likes this.
  3. Marcus

    Marcus Well-Known Member

    I just added a ACP Option (with my computer mouse) to store some value. Do I also have to remove these ACP Options by code?
  4. Chris D

    Chris D XenForo Developer Staff Member


    EDIT: There's actually quite a lot of stuff that you might need to remove via code rather than automatically.

    Here's the list of tables that data is manually deleted from during the XenForo Resource Manager uninstall:

            $contentTypeTables = array(
    Generally this is stuff that isn't necessarily directly associated to an add-on ID (such as options), but more loosely associated to an add-on via the content types.

    All of the actual permission entry data is left over after an install to. To be clear: The permissions themselves are removed automatically, but the values previously chosen are not. That gives the effect that if you uninstalled an add-on and reinstalled it, all the previously chosen permissions would still be set.
  5. Marcus

    Marcus Well-Known Member

    I removed lots of options from xf_option.

    mysqlSELECT addon_id FROM xf_option GROUP BY addon_id;
    addon_id  |
    XenES  |
    XenForo  |
    DELETE FROM xf_option WHERE addon_id IN "addon_id1", ...);
    One option was visible in my xf 1.2 debug install at the (template or datawriter) debug output. I guess all options are loaded on every page view even if the addon related to the option is not activated. Is that true?
  6. Marcus

    Marcus Well-Known Member

    These options are removed now in xenforo 1.2 when you remove an addon.
  7. Mike

    Mike XenForo Developer Staff Member

    Options have been removed with add-on uninstall since 1.0 AFAIK.

    However, I'm not totally clear on the issue. The name mentioned in the opening post doesn't sound like an option - it sounds like a phrase. If something isn't associated with an add-on (for whatever reason), then it won't be deleted when an add-on is uninstalled (as you'd expect).

    Screenshots of the search results and the edit form for the content would be helpful.
  8. Chris D

    Chris D XenForo Developer Staff Member

    I think I got the wrong end of the stick when I responded too. Sorry if I've caused any confusion here.
  9. Marcus

    Marcus Well-Known Member

    I meant this kind of option: upload_2013-11-4_16-56-27.png

    I also had two cron jobs from EWRUtils that I removed. I use xenforo since 1.0.3 and I did remove the files from some addons before clicking on "acp>uninstall" which caused sometimes problems, so I had to reupload files and click on acp>uninstall again to successfully deinstall the addons. It is very likely that all this caused some problems.

    It's just that one option I used was filled with thousands of user_ids so it got quite huge with around 20kb and it was displayed to me on a random "check out the whole returnView template variable", and I was surprised it was there even after removing the addon. But I guess it happened because of the uncommon way of handling addons (see above). The option might be related to my specific addon ( I am not 100% sure and I deleted this option before looking at the addon_id row and I removed the other addon options from EWRUtils which were all related to EWRUtils).

    The option was also there when I searched for the title or id of the addon. I have successfully removed the option on both my debug and live community so i can not provide you with a screenshot anymore. So I would prefer to have this but report closed.
  10. Jeremy

    Jeremy Well-Known Member

    You should never remove files before uninstalling an add-on.

Share This Page