-
Posts
687 -
Joined
-
Last visited
-
Days Won
4
Everything posted by matjazp
-
$pages->find() not respecting my Pages::viewable() hook
matjazp replied to thetuningspoon's topic in API & Templates
I'm using DynamicRoles in production on two sites to allow users with specific roles to edit specific page(s). I started with PW 2.4.x, when I upgraded to PW 3, I had to modify the module by adding the namespace to the files. Then I made changes proposed by Benjamin (issues and PRs), I hope I did it well... -
I already have this logic implemented in my template. I was thinking that your module could just "authenticate" the user with $session->forceUser($user).
- 11 replies
-
Strange indeed. <div id="pageID"...></div> is your page404 markup? File upload is working? Try js debuging whwn upload fails. Enough space on disk?
- 43 replies
-
- ajax
- sys_get_temp_dir
- (and 4 more)
-
Hi Robin! Thanks for the module. I don't need it actually, but I was thinking if it's possible to see the page rendered as a logged in user, eg. not a guest, without bothering the user to log in? I had that need years ago when I had to show my editors how the page would look like when he is logged in (he see a full list of "Items") vs guest users. And if I go further, I had a need to let the user edit this page (only specific page not all pages with this template) so he can see what he would have to deal with when the site is ready for production. Of course, I could point him to skyscrapers demo site or I could put my site to demo mode, but then I couldn't develop it... This is just an idea i wanted to share with, not a feature request.
- 11 replies
-
- 1
-
@tthom_pw thanks for the report, I'm aware of this. The problem is that there is no svgo binary for windows. So I had to take svgop library, but there are problems too: it's 35 MB binary that takes different parameters. I had to convert/pack svgop to svgo using a batch file and the result is a UPX binary that is always treated as suspicious by antivirus software. I'll most likely remove support for svg on windows in the next release.
-
Yet another tiny library (under 200 lines) that might come handy: https://github.com/vladocar/nanoJS
-
@tthom_pwThis report is most likely coming from ConfigServer eXploit Scanner (cxs). You can ask your hosting provider if he is willing to exclude this file from scanning. I'm not familiar with how scanner work but most likely it's searching for strings exec, shell, shell_exec etc.
-
Leave it. Let the user fix it. While I was able to make it work in a terminal, conversion is unreliable.
-
In my case, it doesn't help. I was playing with this when I was developing ProcessFileEdit but haven't found a proper solution. Then support for UTF8 for windows was added I think in 7.0 or 7.1 and then I stopped bothering.
-
The fix would work, but you would have to call it before using wireCache obviously. Don't know if this would impact performance if it would run on a large array.
-
Yep, that's it. That error contains non UTF-8 characters, I assume they are in Windows-1250 character set. The best option is to configure MySQL to return errors in English. Your my.ini will most likely be found in %programdata%\MySQL folder, in [mysqld] section add lc_messages=en_US. Restart mysqld service for changes to take effect. I guess this commit is the culprit for the PW error (SQL error is, of course, another thing).
-
It looks familiar with the issue I had with the terminal panel. Would you mind var_dump($data) in WireCache.php at line 442, just before json_encode($data). Examine the $data to ensure it doesn't contain non UTF-8 characters.
-
-
Yep. Ok, I got it.
-
What do you think about putting temp files at the top?
-
Files field returning null unless I use getUnformatted
matjazp replied to adrian's topic in General Support
Oh, that changes everything ? -
Files field returning null unless I use getUnformatted
matjazp replied to adrian's topic in General Support
Maybe there is no need for another column, just another color? -
Thanks for the module @kongondoI'm playing with this and when URL is /processwire/dashboard-notes/view/ (without note id) I get an error: Call to a member function count() on null in ProcessWire\ProcessDashboardNotes->renderReplyMarkup(), line 1228, $note->dashboard_note is null. Check for urlsegment2 is probably needed. Also when you pass nonexisting id an error is thrown: Argument 1 passed to ProcessWire\WireData::setArray() must be of the type array, null given. I guess there is no support for comments that need to be approved? But as you said, this is in lazy development (nice wording) and good starting point for those who need it.
-
It often happens to me too. I know Ryan made some adjustments in the core so that Tracy is loaded earlier (if I remember correctly), but is there really nothing that could be done in that regard? Could we have some sort of bd() function always available? Independent of the modules load order? Something that we put in init.php, even index.php? Yes, I do use $log methods, but Tracy is very handsome and good looking ?
-
Adrian, I can't maximize the console panel, I see this error in Chrome console: Uncaught ReferenceError: tracyPanel is not defined at tracyResizePanel (?_tracy_bar=js&v=2.6.1&XDEBUG_SESSION_STOP=1:1130) at HTMLAnchorElement.onclick (?id=1015&s=1&c=1:1744) Not sure when this started...
-
Files field returning null unless I use getUnformatted
matjazp replied to adrian's topic in General Support
I cant' replicate here... Sure there are no hooks on url method? -
I see, in AdminiThemeUikit it's ok, no header, in AdminThemeDefault the header is there. Thanks for the info.
-
Rabin, thank you for this. You have: // Pretend that this page is being loaded inside a modal // So that the admin header and footer are not rendered $this->wire('input')->get->modal = 1; This might not be quite true, depending on what is understood by "rendering", as header and footer are rendered, they are just hidden via css. Of course, that's not a "problem" with the module, that's how PW admin works, but it always bothered me. I also never saw anything like this: $page = $ppv->_callMethod('getPage', array()); What is this _callMethod?
-
On mobile... $page->template == 'admin' $page->process == 'ProcessPageEdit'
-
Image Upload / Resize Issues - pathname may not contain double slash “//”
matjazp replied to sivsy's topic in General Support
I tested here and the problem is indeed in WireFileTools.php, these lines: if(strpos($pathname, '//') !== false) { // URLs or accidental extra slashes not allowed if($throw) throw new WireException('pathname may not contain double slash “//”'); return false; } I commented them and image upload is working. Of course, the test for // is there for a purpose, so just commenting it is not the best solution. You are encouraged to report the issue at https://github.com/processwire/processwire-issues/issues OT: I found that using UNC considerably slowed down the whole web site. Maybe it's just something in my config, I simply created a test share on my own PC.