Create new album - window does not close, page does not refresh

DeCysos

Phoenix Foto Service
License owner
▶🚶‍Reproduction steps
  1. Login in youre account
  2. Go to your Albums
  3. Press button "Create a new album"
  4. The window is open -> tip your albumname and press the button "save"
😢Unexpected result

The window "Create New Album" does not close and the page is not updated.
However, changing an existing album will work.

📃Error log message
XHR POST https://DOMAIN/json:
XHR POSThttps://DOMAIN/json [HTTP/2.0 500 Internal Server Error 167ms]
Angefragte Adresse:https://DOMAIN/json
Anfragemethode:POST
Externe Adresse:[2606:4700:30::681b:bcfa]:443
Status-Code: 500 Internal Server Error
Version:HTTP/2.0
TypeError: response is undefined:
error https://DOMAIN/app/lib/chevereto.min.js?fe8d6a760e954acb3fff845a00e08c6d:223
    XHR https://DOMAIN/lib/Peafowl/peafowl.min.js?fe8d6a760e954acb3fff845a00e08c6d:192
    c https://DOMAIN/lib/Peafowl/js/scripts.min.js?fe8d6a760e954acb3fff845a00e08c6d:1
    fireWith https://DOMAIN/lib/Peafowl/js/scripts.min.js?fe8d6a760e954acb3fff845a00e08c6d:1
    k https://DOMAIN/lib/Peafowl/js/scripts.min.js?fe8d6a760e954acb3fff845a00e08c6d:1
    r https://DOMAIN/lib/Peafowl/js/scripts.min.js?fe8d6a760e954acb3fff845a00e08c6d:1
In File: chevereto.min.js:223:522

If I have disabled the code reduction in the dashboard also comes this error message. However, this then for the file chevereto.js:4329:5
row 4329:
    PF.fn.growl.call(PF.fn._s(response.error.message));

PS: I use Cloudflare
 

DeCysos

Phoenix Foto Service
License owner
Problem was fixed by me.
It was not the script or the server itself.

After I put the script in a test environment completely new and only the theme (changed) from my developer environment in the fresh installation packed, I saw that there also the error occurred.
In the exclusion process, I went through each file and have finally found the devil ^ ^


I had the file /app/themes/Peafowl/overrides/tpl_list_item/item_image_edit_tools.php overwritten in the following.
my old code:
<ul class="list-item-image-tools" data-action="list-tools">
    <li class="tool-select" data-action="select">
        <span data-icon-selected="icon-ok" data-icon-unselected="icon-checkbox-unchecked" class="btn-icon icon-checkbox-unchecked" title="<?php _se('Select'); ?>"></span>
        <span class="label label-select"><?php _se('Select'); ?></span>
    </li>
    <?php
        //Wenn NSFW gesetzt ist, dann ist es nur noch änderbar durch Moderatoren und Administratoren is_content_manager()
        if( is_content_manager() ) {
    ?>
     <li class="tool-flag" data-action="flag">
        <span class="btn-icon icon-flag" title="<?php _se('Toggle unsafe flag'); ?>"></span>
        <span class="label label-flag label-flag-unsafe"><?php _se('Flag as unsafe'); ?></span>
        <span class="label label-flag label-flag-safe"><?php _se('Flag as safe'); ?></span>
    </li>
    <?php
        }else{
    ?>
    <li class="tool-flag" data-action="edit">
        <span class="btn-icon icon-lock" style="color:#ff0000;"></span>
        <!-- <span class="label label-flag label-flag-unsafe"><?php _se('Flag as unsafe'); ?></span> -->
        <span class="label label-flag label-flag-safe">Nicht sicher (FSK)</span>
    </li>
    <?php
        }
    ?>
    <li class="tool-edit" data-action="edit">
My new code:
<ul class="list-item-image-tools" data-action="list-tools">
    <li class="tool-select" data-action="select">
        <span data-icon-selected="icon-ok" data-icon-unselected="icon-checkbox-unchecked" class="btn-icon icon-checkbox-unchecked" title="<?php _se('Select'); ?>"></span>
        <span class="label label-select"><?php _se('Select'); ?></span>
    </li>
    <?php
        //Wenn NSFW gesetzt ist, dann ist es nur noch änderbar durch Moderatoren und Administratoren is_content_manager()
        if( CHV\Login::isManager() ) {
    ?>
     <li class="tool-flag" data-action="flag">
        <span class="btn-icon icon-flag" title="<?php _se('Toggle unsafe flag'); ?>"></span>
        <span class="label label-flag label-flag-unsafe"><?php _se('Flag as unsafe'); ?></span>
        <span class="label label-flag label-flag-safe"><?php _se('Flag as safe'); ?></span>
    </li>
    <?php
        }else{
    ?>
    <li class="tool-flag" data-action="edit">
        <span class="btn-icon icon-lock" style="color:#ff0000;"></span>
        <!-- <span class="label label-flag label-flag-unsafe"><?php _se('Flag as unsafe'); ?></span> -->
        <span class="label label-flag label-flag-safe">Nicht sicher (FSK)</span>
    </li>
    <?php
        }
    ?>
    <li class="tool-edit" data-action="edit">
The variable "is_content_manager()" seems to cause an internal error without something being entered in the ErrorLogFile.

Topic can be closed.
(No bug)
 
Top