dragan

Members
  • Content Count

    994
  • Joined

  • Last visited

  • Days Won

    11

dragan last won the day on August 30

dragan had the most liked content!

Community Reputation

889 Excellent

1 Follower

About dragan

  • Rank
    Hero Member
  • Birthday 10/18/1969

Contact Methods

  • Website URL
    http://www.fantastique.ch/

Profile Information

  • Gender
    Male
  • Location
    Switzerland

Recent Profile Visitors

5,567 profile views
  1. dragan

    $this->addHookAfter('Page::render', function ($event) { if ($this->page->template != 'admin') { $event->return = str_replace("<iframe", "\n<div class='videoWrapper'><iframe", $event->return); $event->return = str_replace("</iframe>", "</iframe></div>", $event->return); $event->return = str_replace("<table", "\n<div class='scrollTable'><table", $event->return); $event->return = str_replace("</table>", "</table></div>", $event->return); } }); fwiw, here's the hook how it should have been from the get-go. I omitted the page template if condition (if there's a more recommended way of doing such stuff, I'm all ears).
  2. dragan

    I was focussing on the network panel in Google Chrome, and this didn't show anything. Now I was actually clicking (inside console) on the VM:xxx link that Chrome also provides. This actually showed me the response. Weird (but then again, I don't claim to be a JS debugger guru by any means...)
  3. dragan

    Whoa, I think I found the culprit... It seems like one of my hooks is being triggered also in the backend... [{"error":false,"message":"Added file: tumblr_omeiihbv8g1tu3avjo1_1280.jpg","file":"\/site\/assets\/files\/11482\/tumblr_omeiihbv8g1tu3avjo1_1280.jpg","size":203248,"markup":"<li id='file_5f68e2495aab81b39cb738510564e6dd' class='ImageOuter gridImage ui-widget'><span class=\"aos_moveAssets\"><i title=\"Move to last\" class=\"fa fa-step-backward\" data-down><\/i><i title=\"Move to first\" class=\"fa fa-step-forward\" data-up><\/i><\/span><div class='gridImage__tooltip'> <div class='scrollTable'><table><tr><th>Dimensions<\/th><td>1280x854<\/td><\/tr><tr><th>Filesize<\/th><td>198&nbsp;kB<\/td><\/tr><tr><th>Variations<\/th><td>0<\/td><\/tr><\/table><\/div>\n\t\t\t<div class='gridImage__overflow'>\n\t\t\t\t<img src=\"\/site\/assets\/files\/11482\/tumblr_omeiihbv8g1tu3avjo1_1280.0x260.jpg?nc=1535996482\" alt=\"\" data-w=\"1280\" data-h=\"854\" data-original=\"\/site\/assets\/files\/11482\/tumblr_omeiihbv8g1tu3avjo1_1280.jpg?nc=10\" data-focus=\"50 50 0\" \/>\n\t\t\t<\/div>\n\t\t\t\n\t\t\t\t<div class='gridImage__hover'>\n\t\t\t\t\t<div class='gridImage__inner'>\n\t\t\t\t\t\t<label for='' class='gridImage__trash'>\n\t\t\t\t\t\t\t<input class='gridImage__deletebox' type='checkbox' name='delete_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' value='1' title='Delete' \/>\n\t\t\t\t\t\t\t<span class='fa fa-trash-o'><\/span>\n\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t<a class='gridImage__edit'>\n\t\t\t\t\t\t\t<span>Edit<\/span>\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\t\t\t\t<div class='ImageData'>\n\t\t\t\t\t<h2 class='InputfieldImageEdit__name'><span contenteditable='true'>tumblr_omeiihbv8g1tu3avjo1_1280<\/span>.jpg<a href=\"\/site\/assets\/files\/11482\/tumblr_omeiihbv8g1tu3avjo1_1280.jpg\" target=\"_blank\" class=\"aos_downloadAsset\" download title=\"Download\"><i class=\"fa fa-download\"><\/i><\/a><\/h2>\n\t\t\t\t\t<span class='InputfieldImageEdit__info'>198&nbsp;kB, 1280&times;854 <\/span>\n\t\t\t\t\t<div class='InputfieldImageEdit__errors'><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__buttons'><small><a href=\"\/site\/assets\/files\/11482\/tumblr_omeiihbv8g1tu3avjo1_1280.jpg\" target=\"_blank\" class=\"aos_downloadAsset\" download title=\"Download\"><i class=\"fa fa-download\"><\/i><\/a><button type='button' data-href='\/backstage\/page\/image\/edit\/?id=11482&file=11482,tumblr_omeiihbv8g1tu3avjo1_1280.jpg&rte=0&field=gallery' class='InputfieldImageButtonCrop uk-button uk-button-small uk-button-text uk-margin-small-right pw-modal-large pw-modal' data-buttons='#non_rte_dialog_buttons button' data-autoclose='1' data-close='#non_rte_cancel'><i class='fa fa-crop'><\/i> Crop<\/button><button type='button' class='InputfieldImageButtonFocus uk-button uk-button-small uk-button-text uk-margin-small-right'><i class='fa fa-circle-o' data-toggle='fa-circle-o fa-dot-circle-o'><\/i> Focus<\/button><button type='button' data-href='\/backstage\/page\/image\/variations\/?id=11482&file=tumblr_omeiihbv8g1tu3avjo1_1280.jpg&modal=1&varcnt=varcnt_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' class='uk-button uk-button-small uk-button-text uk-margin-small-right pw-modal-large pw-modal' data-buttons='button'><i class='fa fa-files-o'><\/i> Variations <span class='ui-priority-secondary'>(0)<\/span><\/button><\/small> <select class='uk-select uk-form-small InputfieldFileActionSelect' name='act_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd'><option value=''>Actions<\/option><option value='dup'>Duplicate<\/option><option value='fv'>Flip vert<\/option><option value='fh'>Flip horiz<\/option><option value='fb'>Flip both<\/option><option value='r90'>Rotate 90&deg;<\/option><option value='r180'>Rotate 180&deg;<\/option><option value='r270'>Rotate 270&deg;<\/option><option value='r-90'>Rotate -90&deg;<\/option><option value='r-180'>Rotate -180&deg;<\/option><option value='r-270'>Rotate -270&deg;<\/option><option value='bw'>B&amp;W<\/option><option value='sep'>Sepia<\/option><\/select> <span class='InputfieldFileActionNote detail'>Action applied at save.<\/span><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__core'><div class='hasLangTabs langTabsContainer'><div class='langTabs'><ul uk-tab><li><a data-lang='1010' class='langTab1010' href='#langTab_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd__1010'>English<\/a><\/li><li><a data-lang='10189' class='langTab10189' href='#langTab_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd__10189'>Deutsch<\/a><\/li><\/ul><div class='InputfieldFileDescription LanguageSupport' data-language='1010' id='langTab_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd__1010'><label for='description_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' class='detail LanguageSupportLabel'>English<\/label><input type='text' name='description_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' id='description_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' value='' \/><\/div><div class='InputfieldFileDescription LanguageSupport' data-language='10189' id='langTab_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd__10189'><label for='description10189_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' class='detail LanguageSupportLabel'>Deutsch<\/label><input type='text' name='description10189_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' id='description10189_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' value='' \/><\/div><\/div><\/div><script>setupLanguageTabs($('#wrap_Inputfield_gallery_repeater11482'));<\/script><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__additional'><\/div>\n\t\t\t\t\t<input class='InputfieldFileSort' type='text' name='sort_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' value='0' \/>\n\t\t\t\t\t<input class='InputfieldFileReplace' type='hidden' name='replace_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' \/>\n\t\t\t\t\t<input class='InputfieldFileRename' type='hidden' name='rename_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' \/>\n\t\t\t\t\t<input class='InputfieldImageFocus' type='hidden' name='focus_gallery_repeater11482_5f68e2495aab81b39cb738510564e6dd' value='50 50 0' \/>\n\t\t\t\t<\/div>\n\t\t\t<\/li>","replace":false,"overwrite":0}] This part clearly shouldn't be here: <div class='scrollTable'><table> That was meant to be injected only in the frontend (to make big tables responsive and simply add a wrapper). Thanks a lot @adrian for your patience. Gonna re-write that hook. At least I found the culprit now (my own stupidity)
  4. dragan

    I've disabled now ALL modules with Tracy, and nothing changed. Problem is: Sometimes the images are in fact getting saved, sometimes not. The JS errors remain. It's really quite frustrating... I mean, the JS file that apparently triggers the error is a PW core file, not some extra-module. I even tried with or without SessionHandlerDB - doesn't seem to make a difference (like it was suggested in the other forum thread). (I also made sure my ad-blocker doesn't accidentally block resources, btw)
  5. dragan

    Nope, nada.
  6. dragan

    unexpected token I'm confused too, especially since I came across that same error ages ago, but I can't remember what I did to resolve it. I deinstalled the Image Extra fieldtypes / modules, and tried again. *sigh* Guess I'll have to manually deactivate modules till I find the culprit...
  7. dragan

    Yes, that's where I was looking. I have SessionHandlerDB installed and running. I get the same error as you mentioned in that forum thread you linked (your last post).
  8. dragan

    All of a sudden image-upload seems broken. No matter if I want to upload one single image or several images. Chrome console says: Uncaught SyntaxError: Unexpected token in JSON at position 414 at JSON.parse (<anonymous>) at Function.parseJSON (JqueryCore.js?v=1535110864:2) at XMLHttpRequest.<anonymous> (InputfieldImage.js?v=122-1535110864:1973) // File uploaded: called for each file xhr.addEventListener("load", function() { xhr.getAllResponseHeaders(); var response = $.parseJSON(xhr.responseText); // line 1973 The spinning animation GIF keeps on spinning forever... I thought I have seen a forum thread about such an error, but I can't find it anymore. If I inspect https://dev.mysite.com/backstage/page/edit/?&amp;id=11203&amp;InputfieldFileAjax=1 I only see headers, no content. content-type: application/octet-stream (in request header) in response headers: x-tracy-ajax: 1 x-xss-protection: 1; mode=block Does anyone know what could cause this? PW 3.0.111 / PHP 7.2.8
  9. Most probably the file-paths of your WP site and your PW install don't match. You can't do a copy+paste action like that without adjusting the file-paths/URLs. (doesn't matter from where to where)
  10. dragan

    Same here with PHP 7.1.9 + PW 3.0.106 It would make sense to show which required dependencies exactly are not met.
  11. I'm getting the same error message as pwFoo above, but I'm using* the regular image-upload in the backend. Tracy reports: PHP Warning: filemtime(): stat failed for foo/site/assets/files/1459/__filename___79169f6b6105acbc1299f65e8379b54c54ab3907.titelbild.jpg___description___bildbeschreibung_slide_bild_3___modified__1534175094__created__1518532723__tags_____ in /foo/wire/core/Pagefile.php:521 @ https://dev.foo.com/ That filename is weird. Does anyone know what could cause this? * Actually, the client was uploading files, not me. I just got a notification via email today...
  12. I know it exists, but have never used it myself. Perhaps this Pro module would help? https://processwire.com/api/modules/prodrafts/
  13. dragan

    PW can in fact do that. It's entirely up to the developer what PW should output. JSON, XML, CSVs, HTML... re: Vue.js If you search here for Vue you'll find a few forum topics with tips and project insights, e.g. https://medium.com/icf-church-developers/processwire-vue-js-a-lovestory-d4d5bca365
  14. Un-tick the active checkbox on pages, not the language itself. Use the ChildBatchEditor or AdminActions module to quickly activate or de-activate pages and entire trees/nodes at once.