Git Product home page Git Product logo

Comments (5)

Juinness avatar Juinness commented on July 16, 2024 1

Please apply this =)

#807

you need to regenerate container after applying fix

Oh, I missed the PR. Use the Solution From @stonebuzz

from fields.

hcimadomo-procsi avatar hcimadomo-procsi commented on July 16, 2024

hello,
in fact, after uninstall and reinstall plugin field (v1.21.10) and datainjection (v2.13.5), the mapping is now present. But the fields of bloc not appair. for exemple, i have bloc "ordinateur" with 3 fields
image
and the mapping not show it (choice of field is empty)
image
After search in php-error.log, i found:
image

help ..
Best regards

from fields.

Juinness avatar Juinness commented on July 16, 2024

I have found a solution.
When a field object is created, a class is generated in the folder files/_plugins/fields/inc/.
In the static method get_table($classname = null) the name of the same class is expected as parameter.

The Datainjection-Plugin calls the method without parameters so an empty string is always returned.

To fix the error, I recommend adapting the template plugins/fields/templates/injection.class.tpl as follows:

FROM

static function getTable($classname = null) {
        if ($classname === null) {
            return '';
        }
        $parent_class = get_parent_class($classname);

        if ($parent_class === false) {
            return '';
        }

        return getTableForItemType($parent_class);
}

TO

static function getTable() {
        return getTableForItemType($parent_class);
}

The field object must then be recreated so that the class with the fix is generated.

from fields.

stonebuzz avatar stonebuzz commented on July 16, 2024

Please apply this =)

#807

you need to regenerate container after applying fix

from fields.

stonebuzz avatar stonebuzz commented on July 16, 2024

Fixed since https://github.com/pluginsGLPI/fields/releases/tag/1.21.10

from fields.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.