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.

Preven the errors when template creation process

September 22, 2010 1:00pm

Subscribe [2]
  • #1 / Sep 22, 2010 1:00pm

    dcghost

    36 posts

    There are two little issues founded (reported as bug #13994)

    EE2.1 + multiple site manager.

    If the user will do the next sequence

    * Open CP.
    * Design->Template->New.
    * Then fill up the next form with the form and noticed that he forgot switch to required current site.

    At this moment url already has group_id=10 (where 10 is the group id of current site).

    * So operator will switch the site
    * Submit the form.

    Form will be submitted with previous group_id = 10 but template will have site_id = second site.

    Result: The code did not prevent this error. And this is first problem.

    The next problem at cp/design.php Line Number: 3425. Those code does not validate any array keys and does not catch any exceptions. It does something like:

    a[ b[ c[ “key1” ] ] ]

    Who knows will the C or B return any result or not.

    Result: In case when template was created incorrectly - this existing code produce an exception:

    A PHP Error was encountered
    Severity: Notice
    Message: Undefined index: 8
    Filename: cp/design.php
    Line Number: 3425

    If that is happen (It did happen for me). Use MySQL table browser and query form to find and eliminate the record witch has whrong pair of site_id and the group_id

  • #2 / Sep 22, 2010 5:08pm

    Ingmar

    29245 posts

    Are you having a problem or sharing your solution with us?

  • #3 / Sep 23, 2010 4:51am

    dcghost

    36 posts

    Are you having a problem or sharing your solution with us?

    In my opinion it is problem and it must be solved. I noticed to developers “Attention! Your code does not prevent operator’s mistakes”

    At same time If anyone will have same trouble - I am sharing my solution. The permanent solution can be done only by EE developers!

  • #4 / Sep 23, 2010 3:53pm

    Ingmar

    29245 posts

    Thank your for your feedback. Looks like you have solution for now, please don’t hesitate to post again in case there’s anything else.

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

ExpressionEngine News!

#eecms, #events, #releases