Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7.0-rc1
    • Component/s: None
    • Labels:
      None

      Description

      InvalidBinaryFileIdException are currently rather cryptic:
      1. It does not currently add "message" argument to the string given to user which is intended to give some context info.
      2. Prefix miss match does not give any indication that prefix is wrong, and just says the binary file id is wrong (while it's most likely misconfigured prefix => var_dir setting)

      Example: Person upgrading and merging in changes for var_dir setting on mistake, getting exception that does not give any clue to what went wrong.

        Activity

        Show
        André Rømcke added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/1834
        Show
        André Rømcke added a comment - Merged: https://github.com/ezsystems/ezpublish-kernel/commit/a5872f4dbc860ea41bf6cb1d84775f700bc917c7
        Hide
        André Rømcke added a comment -
        Show
        André Rømcke added a comment - New PR based on late feedback from Bertrand Dunogier : https://github.com/ezsystems/ezpublish-kernel/pull/1840/files
        Hide
        André Rømcke added a comment -
        Show
        André Rømcke added a comment - Additional fix to make string translatable: https://github.com/ezsystems/ezpublish-kernel/commit/72b228c145966594f7c00df6bc6d23f9ba723d15
        Hide
        Miguel das Neves Jacinto (Inactive) added a comment - - edited

        All the occurrences of id in the Exception message string seems to be replaced and not only where it should. Example with FILE as id

        Argument 'BinaryFile::FILE' is invalFILE: '%FILE%' is wrong value, it does not contain '%%'. Is 'var_dir' config correct?
        

        Further more looking closer at the string the prefix is empty. It looks like the InvalidBinaryPrefixException is missing the prefix argument

        Show
        Miguel das Neves Jacinto (Inactive) added a comment - - edited All the occurrences of id in the Exception message string seems to be replaced and not only where it should. Example with FILE as id Argument 'BinaryFile::FILE' is invalFILE: '%FILE%' is wrong value, it does not contain '%%'. Is 'var_dir' config correct? Further more looking closer at the string the prefix is empty. It looks like the InvalidBinaryPrefixException is missing the prefix argument
        Hide
        André Rømcke added a comment - - edited

        [~miguel.jacinto@ez.no] You are completly right, added fixes for that here:
        https://github.com/ezsystems/ezpublish-kernel/commit/9d129018b6beb18dc821b77ef2ffc8f5069b139e

        Show
        André Rømcke added a comment - - edited [~miguel.jacinto@ez.no] You are completly right, added fixes for that here: https://github.com/ezsystems/ezpublish-kernel/commit/9d129018b6beb18dc821b77ef2ffc8f5069b139e
        Hide
        Miguel das Neves Jacinto (Inactive) added a comment -

        Approved by QA

        Show
        Miguel das Neves Jacinto (Inactive) added a comment - Approved by QA

          People

          • Assignee:
            Unassigned
            Reporter:
            André Rømcke
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: