<div dir="ltr">Hi Katrin,<div><br><div>Sorry for the late reply.</div><div><br></div><div>It's not about the translation, but the existence of the item type.</div><div>  my $item_type = Koha::ItemTypes->find('BOOK');</div><div>  $item_type->description; # Or whatever method call</div><div>will fail if "BOOK" is not defined.</div><div><br></div><div>My question was: If an item is defined with a items.itype (or biblioitems.itemtype) that is not an entry in the itemtypes table, is it considered as a configuration issue?</div><div>If yes, I will write a script to catch them, add something to the about page and the update database process.</div><div>If not, we will have to handle that case everywhere in the code.</div><div><br></div><div>Cheers,</div><div>Jonathan</div><br><div class="gmail_quote"><div dir="ltr">On Fri, 14 Jul 2017 at 04:37 Katrin <<a href="mailto:katrin.fischer.83@web.de">katrin.fischer.83@web.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Hi Jonathan,</p>
    <p>I am not sure if I understand correctly, but I think translating
      the itemtype descriptions should be optional not mandatory, so not
      causing errors if the itemtype otherwise is set up correctly
      (having a 'default' description).</p>
    <p>Hope that helps,</p>
    <p>Katrin<br>
    </p></div><div text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="m_-4339468174560619302moz-cite-prefix">On 12.07.2017 20:50, Jonathan Druart
      wrote:<br>
    </div>
    </div><div text="#000000" bgcolor="#FFFFFF"><blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hi devs,<br>
                  <br>
                </div>
                Since bug 17843 I get errors if the item type
                (items.itype or biblioitems.itemtype depending on the
                pref item_level_itypes) does not exist as an item type
                (table itemtypes, filled by Administration › Item types
                administration).<br>
              </div>
              The error (Can't call method "translated_description" on
              an undefined value) appears because we call a method on an
              undefined value.<br>
            </div>
            As this is a configuration issue (right?) I think we should
            add an alert from the <a href="http://updatedatabase.pl" target="_blank">updatedatabase.pl</a> script, then
            a warning on the about page.<br>
            Would that be enough or should we handle the problematic
            case anyway (i.e. call the method only if the item type
            exists in DB)?<br>
            <br>
          </div>
          Cheers,<br>
        </div>
        Jonathan<br>
      </div>
      <br>
      <fieldset class="m_-4339468174560619302mimeAttachmentHeader"></fieldset>
      <br>
      </blockquote></div><div text="#000000" bgcolor="#FFFFFF"><blockquote type="cite"><pre>_______________________________________________
Koha-devel mailing list
<a class="m_-4339468174560619302moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a>
<a class="m_-4339468174560619302moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="m_-4339468174560619302moz-txt-link-freetext" href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a>
git : <a class="m_-4339468174560619302moz-txt-link-freetext" href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a>
bugs : <a class="m_-4339468174560619302moz-txt-link-freetext" href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a></pre>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a></blockquote></div></div></div>