JoomGallery 3.3.4 und Joomla 3.8.12

  • folgender fehler nach update joomla 3.8.11 auf 3.8.12 ich bitte um lösung, joomgalerie 3.4.4 kann ich als admin mit dem Bildeditor der Joomgalerie nicht mehr speichern, als user schon


    Fehler

    RuntimeException: Ungültiges Feld: cid in /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/libraries/src/Form/Form.php:2076
    Stack trace:
    #0 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/libraries/src/Form/Form.php(1226): Joomla\CMS\Form\Form->validateField(Object(SimpleXMLElement), '', '991', Object(Joomla\Registry\Registry))
    #1 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/administrator/components/com_joomgallery/models/image.php(1010): Joomla\CMS\Form\Form->validate(Array)
    #2 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/administrator/components/com_joomgallery/models/image.php(247): JoomGalleryModelImage->_validate(Object(Joomla\CMS\Form\Form), Array)
    #3 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/administrator/components/com_joomgallery/controllers/images.php(462): JoomGalleryModelImage->store()
    #4 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/libraries/src/MVC/Controller/BaseController.php(710): JoomGalleryControllerImages->save()
    #5 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/administrator/components/com_joomgallery/joomgallery.php(68): Joomla\CMS\MVC\Controller\BaseController->execute('apply')
    #6 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/libraries/src/Component/ComponentHelper.php(382): require_once('/var/www/vhosts...')
    #7 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/libraries/src/Component/ComponentHelper.php(357): Joomla\CMS\Component\ComponentHelper::executeComponent('/var/www/vhosts...')
    #8 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent('com_joomgallery')
    #9 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
    #10 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/libraries/src/Application/CMSApplication.php(195): Joomla\CMS\Application\AdministratorApplication->doExecute()
    #11 /var/www/vhosts/hosting107167.a2f1b.netcup.net/httpdocs/amateurfotografen/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
    #12 {main}


    Danke Achim

  • PHP-Version fehlt.


    Ich finde zwar auch 500-Fehler wie

    Zitat

    Too few arguments to function JoomFile::resizeImage(), 8 passed in /administrator/components/com_joomgallery/models/image.php on line 467 and exactly 10 expected

    wenn ich bspw. in einem bereits erfolgreich hochgeladenen Bild versuche, ein neues Thumbnail einzusetzen.


    Aber grundlegend kann ich im Backend als SuperUser Bilder hochladen und dann geänderte Einstellungen bearbeiten/speichern.


    Müsstest also mindestens deine Arbeitsschritte bis zum Problem detaillierter angeben, damit man das Schritt für Schritt nachvollziehen kann.

  • es kommt nur wenn ich als admin ein Foto barbeite mit Namen nobuddy also annonym setze für den wettbewerb damit User dieses bewerten können ohne zu wissen vom wehm das foto ist , wenn ich speichere kommt diese meldung,

    die php version ist 7.0.31

  • Zurückzuführen ist die Meldung auf diese grünen, neuen Zeilen


    https://github.com/joomla/joom…a0982c26d8f41ffbe2206ad45


    (siehe dort unter libraries/src/Form/Form.php)


    Mir ist allerdings die Erklärung vollkommen unverständlich, da die Code-Änderung "still und heimlich" eingesetzt wurde und ich sonst bisher nix dazu finde. Vielleicht ein Security-Fix? Wer kann/will das wissen?

    Zitat

    // If the field is disabled but it is passed in the request this is invalid as disabled fields are not added to the request

    Das angemahnte cid ist halt die ID des Bildes und die ist disabled (also nicht bearbeitbar). Deshalb stirbt die Speicherung.

    Dann wird es wohl mal Zeit für eine Supportanfrage bei Joomgallery.

    Joh! Sollen die das ausklamüsern.

  • Als schneller Fix. Vielleicht sogar endgültiger:


    In Datei /administrator/com_joomgallery/models/forms/image.xml

    Code
    <field
    name="cid"
    type="text"
    class="readonly"
    label="COM_JOOMGALLERY_IMGMAN_IMAGE_ID"
    size="20"
    readonly="true"
    disabled="true"
    />

    Das

    Code
    disabled="true"

    entfernen.

    LEider funktioniert das bei mir (lokal) nicht. Fehler bleibt.

    Muss ich bei einer xampp installation irgendwas aktualisieren wenn ich eine datei in dem pfad umschreibe?


    P.s.: RE:Later der Pfad muss sicher komplett so lauten: /administrator/component/com_joomgallery/models/forms/image.xml ?

  • In diesem Fall hatte ich halt Dreamweaver CS5 offen, weil für so schnelle Nebenbei-HinUndHer-Tests nicht falsch. Der hat zwar (ein noch dazu viel zu kurzes, ausgegrautes Feld), wo der Pfad angezeigt wird, aber rauskopieren geht halt nicht, damit es gänzlich sinnfrei ist. Hat noch nicht mal so was wie "Aktuellen Pfad in Editor einfügen" oder "Pfad kopieren" bei Rechtsklick oder so.


    Gibt ja noch mehr so Putzigkeiten in der Adobe-Welt ;)

  • Dieser Patch hier: https://github.com/joomla/joomla-cms/pull/21887/files wird in der nächsten Version eingebaut werden falls nötig kann man das auch jetzt schon vorab machen:


    https://patch-diff.githubuserc…oomla-cms/pull/21887.diff


    Alle Zeilen mit einem `-` davor löschen und die Zeilen mit dem `+` einfügen.

  • So es fuzzte nicht mit dem codeschnipsel, habe aus einem Backup die Form.php genommen die auf dem server gelöscht und die andere wie gesagt eingefügt und man siehe es ging, aber Danke für den Tip mit der Form.php.lg Achim

  • Dieser Patch hier: https://github.com/joomla/joomla-cms/pull/21887/files wird in der nächsten Version eingebaut werden falls nötig kann man das auch jetzt schon vorab machen

    Leider in diesem Falle nein. Ich habe das mit der 3.8.13-dev getestet, wo der Patch schon drin war.


    StackTrace #2: Das JoomGallery model fragt nach

    $return = $form->validate($data);


    $data enthält das Feld cid, das auf disabled="true" steht.


    StackTrace #1: Form::validate packt dann die $data in den Registry $input

    $input = new Registry($data);


    StackTrace #0: und übergibt dann via foreach jedes Feld an

    $valid = $this->validateField($field, $group, $value, $input);


    und da ist es dann egal, ob "altes" oder "neues" if, weil in beiden Fällen das Feld "disabled" ist und in beiden Fällen $input gefüllt ist.