Jump to content

matjazp

Members
  • Posts

    683
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by matjazp

  1. Thx Robin! While the Save + Close button is there (as expected), the js part makes the edit links all open home page, eg. they all have the link /processwire/page/edit/?id=1&quick_edit=1 I fixed that with:

    const $links = $('.PageListActionEdit a:not([data-autoclose])');
    $links.each(function() {
        $link = $(this);
        $link.attr('data-autoclose', '#save-and-close').attr('href', $link.attr('href') + '&quick_edit=1');
    });

    Just to mention that using uk-hidden class (as a "belt and suspender" approach) would only work in AdminThemeUIkit, leaving out newer (and older) admin themes.

    • Like 2
  2. Now that you explain it, I remember this behavior of modal.js. But, unfortunately, it doesn't work here, only the Save button is cloned. Looking at the modal.js line 417, $icontents.find(buttonSelector) only returns one button, not two as expected. It seems like the Save+Close button is added too late, after the modal has already cloned the Save button. While debugging, I added the button unconditionally and also removed the uk-hidden class, and then edited the page in a new tab with modal=1, and both buttons were there, as expected. But not in modal. I guess if I add the button directly to the ProcessPageEdit.module (or via hook), it would work. But it's working for you, so there must be something with my installation. It's a bit late here, so I'll continue testing tomorrow. 

  3. Quote

    Do you have numbers for that? I can't really believe it and it sounds interesting 🙂 

    Nope, as I don't have ProCache, but based on what I've read and info from the forum, ProCache serves static files and there might be directives needed in .htaccess. I'm on IIS so it's not an option for me. AIOM+ leverages the template page cache built in core and uses a small php file to render those files. It's not perfect as modification of index.php is needed for best results (I have a feature request open). It also works if you modify some settings in site config.php, but it's not that effective.

  4. Thanks. You can comment this line.

    This module is still working, but need some love and could be simplified if required PHP version is bumped up. There is also a new version of file editor (with the same namespace) written by someone else (can't remember the name), I think it's actively maintained?

  5. It's not just quotation marks. In setAttributeValue() in InputfieldURL.module:

    input (dirty) value:
    https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTY0NjAwYmUtOGIxNy11OGI5LWExMWMtNThlMmRmZGU5YTZl%40thread.v2/0?context={"Tid"%3a"36cabc20-3b53-4a0d-be6d-1fb3a94f9786"%2c"Oid"%3a"a508db2a-aff9-475e-9cf2-e51581a58320"}
    
    sanitized value using sanititer()->url() method:
    https://teams.microsoft.com/l/meetup-join/19:meeting_OTY0NjAwYmUtOGIxNy11OGI5LWExMWMtNThlMmRmZGU5YTZl@thread.v2/0?context={"Tid"%3a"36cabc20-3b53-4a0d-be6d-1fb3a94f9786"%2c"Oid"%3a"a508db2a-aff9-475e-9cf2-e51581a58320"}
    
    rawurldecoded value:
    https://teams.microsoft.com/l/meetup-join/19:meeting_OTY0NjAwYmUtOGIxNy11OGI5LWExMWMtNThlMmRmZGU5YTZl@thread.v2/0?context={"Tid":"36cabc20-3b53-4a0d-be6d-1fb3a94f9786","Oid":"a508db2a-aff9-475e-9cf2-e51581a58320"}

    As sanitized and rawurldecoded values differ, PW returns an error. I'm not sure how te deal with that, perhaps open an issue report? What could you do: a) use plain text field, b) instruct users to rawurldecode the url 🙂 

    • Like 1
  6. Ryan, thank you for all the updates!!! It's a lot of work, if you think I could help you more, please let me know.

    Here are a few more, I'm sure that's not all:

    /wire/modules/Inputfield/InputfieldSelector/InputfieldSelector.js .removeAttr('disabled') -> .prop('disabled', false);
    /wire/modules/InputfieldTinyMCE/plugins/pwimage.js .load(), .click()
    /wire/modules/Jquery/JqueryUI/panel.js .resize()

    Those listed below are from third parties; some are staled at the development. Replacing them with the new version require more testing, so I'm not sure if it's worth your time.


    /wire/modules/Process/ProcessPageEditImageSelect/cropper/cropper.js .load(), .isFunction()

    /wire/modules/Inputfield/InputfieldDatetime/timepicker/jquery-ui-sliderAccess.js .click()
    /wire/modules/Inputfield/InputfieldDatetime/timepicker/jquery-ui-timepicker-addon.js multiple deprecations
    Consider updating jQuery Timepicker Addon from v 1.6.1 to 1.6.4 with this fork: https://github.com/DanielTOsborne/jQuery-Timepicker-Addon (see attached file) 

    /wire/modules/Jquery/JqueryMagnific/JqueryMagnific.js .isFunction(), .focus()
    Consider upgrade to v1.1.0 (see attached file) and also check this potential security leak: https://github.com/dimsemenov/Magnific-Popup/issues/1189 

    /wire/modules/Jquery/JqueryUI/vex/scripts/vex.combined.js .click(), .bind()
    Latest version: https://github.com/HubSpot/vex/archive/refs/tags/v4.1.0.zip 

    /wire/modules/Jquery/JqueryUI/selectize/js/standalone/selectize.js .focus()
    Latest version: https://github.com/selectize/selectize.js/archive/refs/tags/v0.15.2.zip but still with deprecated methods 😞

    JqueryMagnific.zip timepicker.zip

    • Like 2
  7. https://github.com/jquery/jquery-migrate/blob/main/warnings.md

     

    Quote

     

    JQMIGRATE: jQuery.fn.click() event shorthand is deprecated

    Cause: The .on() and .trigger() methods can set an event handler or generate an event for any event type, and should be used instead of the shortcut methods. This message also applies to the other event shorthands, including: blur, focus, focusin, focusout, resize, scroll, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and contextmenu.

     

     

    • Like 1
  8. I'm testing with $config->debug="dev" and there are no major issues. Thanks for the update, @ryan

    I found these js files that might need some updates for the lastest jQuery (deprecations):

    /wire/templates-admin/scripts/install.js
    /wire/templates-admin/scripts/inputfields.js (focus)
    /wire/modules/AdminTheme/AdminThemeDefault/scripts/install.js
    /wire/modules/AdminTheme/AdminThemeDefault/scripts/main.js
    /wire/modules/AdminTheme/AdminThemeReno/scripts/main.js
    /wire/modules/System/SystemNotifications/Notifications.js
    /wire/modules/Process/ProcessRole/ProcessRole.js
    /wire/modules/Process/ProcessProfile/ProcessProfile.js
    /wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.js
    /wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.js
    /wire/modules/Inputfield/InputfieldDatetime/timepicker/jquery-ui-sliderAccess.js (upgrade to 1.6.3)
    /wire/modules/Inputfield/InputfieldDatetime/timepicker/jquery-ui-timepicker-addon.js (upgrade to 1.6.3)
    /wire/modules/Inputfield/InputfieldPageTable/InputfieldPageTable.js

    /wire/modules/Inputfield/InputfieldSelector/InputfieldSelector.js
    /wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.js

    /wire/modules/Jquery/JqueryWireTabs/JqueryWireTabs.js (eq)
    /wire/modules/LanguageSupport/LanguageTabs.js
    /wire/modules/Jquery/JqueryTableSorter/widgets.js
    /wire/modules/Jquery/JqueryTableSorter/JqueryTableSorter.js (new version 2.31.3 also has issues with deprecated function calls)
    /wire/modules/AdminTheme/AdminThemeUikit/layout/source/stable/plugins/jquery.layout.buttons.js

    I would also update ckeditor to v4.21.0 and uikit to v3.16.14.

    EDIT: Ryan, I tested with this forked version of JqueryTableSorter: https://github.com/DavidAnderson684/tablesorter and there are no deprecations in the lastest version of jQuery. I'm attaching a zip file with the files to be replaced in /wire/modules/Jquery/JqueryTableSorter/

    JqueryTableSorter.zip

    • Like 4
×
×
  • Create New...