Robin S

  • Content count

  • Joined

  • Last visited

  • Days Won


Robin S last won the day on March 9

Robin S had the most liked content!

Community Reputation

1,686 Excellent

1 Follower

About Robin S

  • Rank
    Hero Member

Profile Information

  • Gender
  • Location
    New Zealand
  1. You could have the template throw a 404 if it is not an ajax request, but I don't think there is any special security provided by $config->ajax. Putting your ajax response code into a template makes it no more or less secure than how you have it currently. Others here can probably advise you better about security than I can, but I think you'd need proper authentication if your code is returning something sensitive.
  2. You probably did that because PW blocks direct access to PHP files inside the /site/ directory. If you are considering making a change to your site I think it would be better put the contents of file.php into a PW template file and access it as a page at or whatever. Also no need to bootstrap PW if you do it that way.
  3. Module

    I could test it in my current project and report back, but the thing is that I need the file tagging to work inside an ajax-loaded repeater or else I have to go with a different approach. I've had a little look at the JS side of things but haven't been able to figure out what needs to change in order to get that working - particularly around the use of the PW JS config array when a field is ajax-loaded.
  4. Module

    I think all that might be needed is to change instances of "InputfieldImage" to "InputfieldFile" and the module will work for both File and Image fields (because InputfieldImage extends InputfieldFile). I checked it quickly and it seemed to work, but might need some more testing or someone with deeper knowledge to verify.
  5. Yes, it navigates between sibling pages, so you would use it when you are on a child page of Section 1, Section 2, etc. If you are on page Section 1 and you want to get the first child of that page you would use $page->child(). So if you want to navigate between levels as well as between siblings you would use some logic in your template to determine how you generate the navigation links. For example, check if $page has children and if so use $page->child(), otherwise use $page->next() - that sort of thing. Edit: I just noticed this... You can't have a page actually be another page (e.g. it's first child). Each page is an independent entity in the tree hierarchy. But you can have a page redirect to another page when it is viewed on the front-end. See $session->redirect().
  6. I tested this and can confirm. @palacios000, could you please open an issue on GitHub for this?
  7. Hi @Jays and welcome! If I understand right, in your example if you are on "page section 1-2" you want to have a "prev" link to "page section 1-1" and a "next" link to "page section 1-3". If so then the API methods $page->next() and $page->prev() are what you're looking for.
  8. Module

    Re #3: I'm not really up to speed on renderReady(), but because you are hooking an existing inputfield I think you may need to use the new renderReadyHook() hookable method, as hooking render() doesn't work so well for ajax fields when adding JS dependencies. This GitHub issue has a bit of background.
  9. I think maybe this module uses the core ProcessForgotPassword module. You may need to set the config option for that module: "Email address to send messages from"
  10. Module

    Hi @Macrura, a feature request: could you extend SelectizeImageTags to provide tagging support for File fields too? Hopefully not too difficult as I think the field types are quite similar. Thanks in advance! Also, I noticed a few issues with SelectizeImageTags: 1. The "Selectable Tags " inputfield shows "0" when the module has just been installed and no tags have yet been added. Maybe that's normal. 2. Line 129 isn't producing a proper array of tags in my Windows localhost environment. Changing to from PHP_EOL to "\n" did the trick but not sure if that's a fix that would work on all platforms. 3. The JS isn't initialising when the image field's visibility is set to "Closed + load only when opened (AJAX)", or when the field is inside an AJAX-loaded repeater item.
  11. Learning Git has got to be a good thing (I need to learn more about it myself), but in terms of solving the "two computers for local development" issue in the quickest and simplest way I would have thought this would be the thing to look at: I think you want a single version of the files and DB on the laptop (in case you need to work away from home some time) and then access those on the desktop machine via a local network. Just leave the laptop on when you want to work from the desktop. Or another idea: just carry the laptop downstairs and work exclusively on that machine (I have a large external monitor and external keyboard I plug my laptop into when working at my desk).
  12. @SamC, I usually do what @BitPoet suggests and create custom login and profile edit forms for the front-end if the user only needs to edit their profile (or some other single page). But there are a few modules and snippets around that take the approach of creating a custom dashboard in the PW admin for users with non-superuser roles and redirecting them to that when they log in rather than the page tree. Here are a couple of links, and just search for "dashboard" to find more:
  13. @adrian, just as an aside: reading the issue you opened on the Tracy GitHub about loading speed there was the suggestion that sessions are the bottleneck. Do you think that having the session data in the DB would speed up that data delivery? In other words, might it improve Tracy performance if both Tracy and SessionHandlerDB are installed?
  14. Changing the data column type did fix the issue - thanks! I guess that issue occurs because Tracy is storing a lot of data in the session. Before changing the column type I did some logging of static::$showPanels - much of the time it would be an array but randomly sometimes null. No more nulls after changing the column type.
  15. Thanks. Not worth your time to spend ages debugging 2.7.x issues, as just about everyone will be using 3.x going forward. I think perhaps just advise people using 2.7.x together with SessionHandlerDB to run the Legacy branch. Maybe the module could detect those conditions on install and select the Legacy branch by default. If it's of interest here are a couple of errors I see with Master branch + SessionHandlerDB + PW2.7.3: PHP Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in /home/mysite/web/test/wire/core/Session.php:459 PHP Warning: Invalid argument supplied for foreach() in .../site/modules/TracyDebugger/TracyDebugger.module:756