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

Fixed Template modification key prevents add-on install

Discussion in 'Resolved Bug Reports' started by RoldanLT, Aug 20, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    XenForo 1.4.0 beta 3, I tried to re-install Extra Portal Addon, and got this error:
     
  2. Alluidh

    Alluidh Well-Known Member

    Maybe you should talk to the addon developer?
     
  3. RoldanLT

    RoldanLT Well-Known Member

    I don't have that problem before, it only occur on XF 1.4.0 beta 3.
     
  4. Lexy

    Lexy Active Member

    you use 1.4.0 on live forum??
     
  5. HWS

    HWS Well-Known Member

    Most likely this is caused by a line break in the XML file done automatically by the editor software. You may want to check that.
     
    RoldanLT likes this.
  6. RoldanLT

    RoldanLT Well-Known Member

    Yes, since Beta 1.

    I can't find any line break here's the screenshot of the addon XML
    upload_2014-8-21_3-6-0.png
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    It might not be the add on ID that triggers the error. Could be any number of items that require IDs.
     
    HWS and RoldanLT like this.
  8. RoldanLT

    RoldanLT Well-Known Member

    OK, Any Mods online please merge this thread to Extra Portal Discussion Thread.
    But I don't encounter this before :/
     
  9. RoldanLT

    RoldanLT Well-Known Member

    Just an update, I don't have this kind of problem on XenForo 1.4.0 Beta 2 and below.
    I just tested now on 1.4.0 beta 2 board.
     
  10. Chris D

    Chris D XenForo Developer Staff Member

    Just did some diff comparisons on the new code.

    It's this:

    PHP:
    if (preg_match('/[^a-zA-Z0-9_]/'$key))
    {
        
    $this->error(new XenForo_Phrase('please_enter_an_id_using_only_alphanumeric'), 'modification_key');
        return 
    false;
    }
    The verification of the template modification key.

    I never knew that it wasn't already constrained to those characters, but it was. Seems like Extra Portal has modification keys such as:
    add simpleportal promotelink

    It tends to be the description copy and pasted, it seems.
     
    SneakyDave, Dan and RoldanLT like this.
  11. HWS

    HWS Well-Known Member

    The modification key always had this restrictions in its description. It seems like a bug fix, because this should always have been checked.

    Anyway: This problem is caused by Extra Portal and has to be fixed by its developer.
     
    RoldanLT and Lexy like this.
  12. Chris D

    Chris D XenForo Developer Staff Member

    That's not entirely true. The description on the page at is (and always has been as far as I can remember): This is used to uniquely identify a modification across add-on upgrades.

    But you're right. It's a reasonable change for XF to have made and would be an add-on fix.
     
  13. Dan

    Dan Well-Known Member

    That is exactly what it was. Should be add_simpleportal_promotelink (along with a couple of others.) Fixing now.
     
    SneakyDave and RoldanLT like this.
  14. Mike

    Mike XenForo Developer Staff Member

    This wasn't actually supposed to trigger when installing or upgrading an add-on. It was mostly to get the add-on developers to be aware of it when creating or changing. I just forgot that, of course, this check would run on installation of an add-on.

    So the check now only runs when you try to edit the modification (which would require a change to push anything through).
     
    RoldanLT, Bob and Chris D like this.

Share This Page