Menu

Php decrated while installing extension from itop 3.1

kpelaz
2024-02-15
2024-02-21
  • kpelaz

    kpelaz - 2024-02-15

    Hello when I want to install an extension on itop 3.1 I get this error message which appears :

    PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in C:\Serveur iTop\web\core\designdocument.class.inc.php on line 122

    My php is 3.1 with mysql 5.7 and it works perfectly
    But the extensions don't
    thanks for the help

     
  • kpelaz

    kpelaz - 2024-02-17

    up please

     
  • kpelaz

    kpelaz - 2024-02-17

    up please

     
  • Guillaume Lajarige

    Hello kpelaz,

    Thanks for pointing this out, can you share your customs XML or extensions so we can reproduce? I think the fix is obvious, but we rather be able to reproduce something rather than fix it blindly.

    Thanks,
    Guillaume

     
  • kpelaz

    kpelaz - 2024-02-19

    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.1">
    <classes>
    <class id="user-content-UserRequest" _delta="must_exist">
    <fields>
    <field id="user-content-status" xsi:type="attributeEnum" _delta="must_exist">
    <values>
    <value id="user-content-Livraison_en_cours" _delta="define">
    Livraison_en_cours
    </value>
    </values>
    </field>
    </fields>
    <lifecycle>
    <stimuli>
    <stimulus id="user-content-Livraison_en_cours" xsi:type="StimulusUserAction" _delta="define">
    </stimulus></stimuli>
    <states>
    <state id="user-content-Livraison_en_cours" _delta="define">
    <flags>
    <attribute id="user-content-private_log">
    <read_only>
    </read_only></attribute>
    </flags>
    <transitions>
    <transition id="user-content-ev_resolve" _delta="define">
    <target>resolved</target>
    <actions>
    <action>
    <verb>SetCurrentDate</verb>
    <params>
    <param xsi:type="attcode">resolution_date
    </params>
    </action>
    </actions>
    </transition>
    </transitions>
    </state>
    <state id="user-content-pending" _delta="must_exist">
    <transitions>
    <transition id="user-content-Livraison_en_cours" _delta="define">
    <target>Livraison_en_cours</target>
    <actions>
    <action>
    <verb>SetCurrentDate</verb>
    <params>
    <param xsi:type="attcode">last_pending_date
    </params>
    </action>
    </actions>
    </transition>
    <transition id="user-content-ev_resolve" _delta="define">
    <target>resolved</target>
    <actions>
    <action>
    <verb>SetCurrentDate</verb>
    <params>
    <param xsi:type="attcode">resolution_date
    </params>
    </action>
    </actions>
    </transition>
    </transitions>
    </state>
    </states>
    </lifecycle>
    </class>
    </classes>
    </itop_design>


    This is an example of an extension I created. It works correctly when I install it on itop 3.1 with only requests but when I install itop with request and incident I have the php deprecated problem.

     
  • kpelaz

    kpelaz - 2024-02-19

    can you tell when you fix the problem so i can install my extension please

     
  • Guillaume Lajarige

    I don't know if it is due to SourceForge formatting, but your "param" tags don't have closing nodes. This could be the issue.

    For example:

    <params>
    <param xsi:type="attcode">resolution_date
    </params>
    

    Shoule be:

    <params>
    <param xsi:type="attcode">resolution_date</param>
    </params>
    
     

    Last edit: Guillaume Lajarige 2024-02-19
    • kpelaz

      kpelaz - 2024-02-20

      Yes it's because of sourceforge but like the correction you made that's how I did the code in the extension
      The problem is that the extension applies correctly when I install itop in all tickets mode in request mode. But when I do the installation in an itop which differentiates between requests and incidents, that's where php deprecated is put
      Besides, if you correct the problem, do you have to do an update that you distribute or is it done automatically?

       
  • kpelaz

    kpelaz - 2024-02-20

    here is the code correctly put on visual studio code

     
  • kpelaz

    kpelaz - 2024-02-20

    Here is the version on which the extension works, however on the one where I have the problem it is configured with
    The extension works on itop configured in simple ticktet management.
    But when I put itop in itil compliant ticket management with the 3 options checked
    it does not work

     

    Last edit: kpelaz 2024-02-20
  • kpelaz

    kpelaz - 2024-02-20

    here the xml file of my extension

     
  • kpelaz

    kpelaz - 2024-02-20

    it's good now
    The problem was in the file module
    Wrong dependacies

     
  • Guillaume Lajarige

    Great, glad to see you fixed it!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.