Knowledge Base - Attachments problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Scott_Smith
    Junior Member
    • Oct 2017
    • 27

    Knowledge Base - Attachments problem

    Hi Tanya... just thought I would let you know that for some reason when you click on a KB article the error box shows 'Bad Server Response'. We have about 20 articles, typically pdfs which were attached but are not showing at all in the UI. However, in the attachments table they appear to all be there when I looked via MyPHP(Just used for viewing only!!!)

    Anyway, I then decided to try Admin/Rebuild back-end through the UI but no difference.
    Our current version is 4.8.3 which I upgraded to last month or so and this could have been the trigger as I have not been in the KB for a while so I would not have noticed!

    Any suggestions?

    thanks!
    Scott

    PS
    ===
    current ver libmysql - 5.1.73


    Log entry showing error
    ==================

    [2017-12-12 14:21:19] Espo.ERROR: API [GET]:/:controller/:id, Params:Array ( [controller] => KnowledgeBaseArticle [id] => 58b53091cdd7986c5 ) , InputData: - SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC' at line 1 [] []

    [2017-12-12 14:21:19] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC' at line 1, Code: 42000 URL: /espo/api/v1/KnowledgeBaseArticle/58b53091cdd7986c5 [] []



    Final Note
    ========
    I just tried creating a brand new document with an attachment in the Knowledge Base and the document saves but there's NO ATTACHMENT.... hmm does this help diagnosing??
  • Scott_Smith
    Junior Member
    • Oct 2017
    • 27

    #2
    OK... weird... just upgraded to 4.8.4 and now the attachments show up on the Detail form but not on the List form/view...

    Comment

    • tanya
      Senior Member
      • Jun 2014
      • 4308

      #3
      If you want, that attachments come visible on list view, you need to override service KnowledgeBaseArticle and, the method loadAdditionalFieldsForList

      something like this
      Code:
      public function loadAdditionalFieldsForList(Entity $entity)
          {
              parent::loadAdditionalFieldsForList($entity);
              $this->loadLinkMultipleFields($entity);
          }
      or
      Code:
      public function loadAdditionalFieldsForList(Entity $entity)
          {
              parent::loadAdditionalFieldsForList($entity);
              $this->loadLinkMultipleField('attachments');
          }
      I created a custom dashlet to shown all opportunities from that belongs to a customer, related to opportunities is in my case an entity called "Projekt".

      Most entitys have a relation with teams, but in the layout of the entitys the team field is not there. Is there any config to change that? Thanks in advance

      Comment

      Working...