-
Posts
2,233 -
Joined
-
Last visited
-
Days Won
47
Everything posted by netcarver
-
Yes! Very pleased to see this finally make it into the core. Thanks for mentioning my old module too - as it happens, I'm still using it, and just updated it to work with PHP7.2. Thanks, Ryan.
-
@Robin S Thanks for this very useful module! I've not yet dug into its internals, but before I do, I'd like to know if it would it be possible to control the "trashability" of a repeater entry based on a value within it? (I have a hidden field in one of my repeaters and I'd like to prevent deletion of items if that field is non-blank.) Is the module ajax calling to check for conditions or is everything pushed into client-side JS?
-
Hi @Macrura This has a side effect if used on a field that is set to Ajax open (closed and ajax load only when opened) - the entire text is shown, sans link, before the ajax load completes and is shown again, with the 'more' link, once the load completes...
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
netcarver replied to kongondo's topic in Modules/Plugins
Thank you for posting this. Sounds like an approach I could have taken. I chose to solve this a slightly different way though. -
All done. Simpler than I thought it would be in the end... $(document).on('wiretabclick', function(event, newTab, oldTab) { old_id = oldTab.attr('id'); new_id = newTab.attr('id'); if ((old_id !== new_id) && (new_id === 'Inputfield_mailing_actions')) { var changes = $(".InputfieldFormConfirm:not(.InputfieldFormSubmitted) .InputfieldStateChanged"); if(changes.length !== 0) { $('#Inputfield_save_btn').click(); } } }); The missing code was in the templates-admin/scripts/inputfields.js file at line 901.
-
Well, I found Soma's old FormSaveReminder module - which I can dissect, but I've not found the code PW currently uses, despite grepping for the message you get when you move away from a page with unsaved edits. Perhaps my grep skills are rusty. Update: Ok, thanks to this old blog post, I'm pretty sure I've found what I need. Will post solution once it's come together.
-
Hello all, Can anyone point me in the right direction here. When editing the pages of a certain template, I have a tab (Fieldset Tab Open) into which I've added a runtime markup field which does state verification and, if all's good, adds an email send button to the page. I have a pages::saved() hook that takes care of the actual send should the button be clicked. This works fine, and is out on a production server, but it has a drawback; it requires the user to save the page before the information used to generate the send button is in sync with any changes the user has made. Even if I make the tab ajax load, this only works for the first set of changes the user makes, ie, when they switch to the tab for the first time. If they go back to one of the regular content tabs and make an additional change, the content of the send tab is now potentially stale and requires a re-save to freshen it. To help with this workflow, I'd like to make it so that the very act of clicking on the send tab activates a page save, if needed, ensuring the content of the send tab is always in sync with the stored data. State of page changes is tracked by JS already - so this must be possible. Whilst I'm sure I can patch my way to a solution, any help short-cutting that route would be appreciated. Many thanks in advance, Steve
-
Repeater field images not showing on production server
netcarver replied to Xonox's topic in General Support
Do you have $config->pagefileSecure = true; in your config.php file on the production server? There are a couple of issues regarding images in repeater fields and profiles, that were just fixed in the last two days. Please see issues #625 and #629 for more information. If this is the same as one of those problems, you can either update to the latest code in the dev tree, or turn off pagefileSecure (if it isn't needed.) Hope that helps. -
Very nice, as usual @Macrura. Thank you!
-
Hmmm, if the user doing the search has read permissions to logfiles, could the logs be made searchable without having to drill down into the actual logs page? ?
-
Parent field selector and children all selector
netcarver replied to Sinmok's topic in General Support
The main selectors document is here. There are a couple of examples of using 'children' in selectors, starting here. Sorry, I can't say I've used that in selectors before so all I can do is signpost at the moment. -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
netcarver replied to Nico Knoll's topic in Modules/Plugins
Hi @adrian I'm not using your fork actively - because I wasn't previously aware of it. I do know people who use Nico's original module - but having had a quick look at the changes in your module I'll be switching over to using it going forward. If Nico is not currently accepting pull requests, (I know I go through phases like that with my modules) then perhaps starting an alternative module from your fork would be the way to go. MarkupSEOExtended? -
Great to have you back, Adrian. Thanks for pulling in the change.
-
Ok, @vincent I've submitted a pull request to get this change into the master repository. Thanks for checking.
-
@vincent Yes, sounds like the same problem. If you edit the .module file and make the change I posted above, your problem should be resolved. I cloned the repo and added the change. Can you try my version from here and let me know if that fixes it for you. If so, I'll send a PR over to Adrian.
-
Hi @adrian I'm seeing an error - apparently due to this module - when trying to add a Repeater item on a page where tabs have been hidden and I'm not logged in as a super-user (all ok when logged in as a Super.) Fatal error: Uncaught Error: Call to a member function wrapAttr() on null in /site/modules/RestrictTabView/RestrictTabView.module:117 Stack trace: #0 site/modules/RestrictTabView/RestrictTabView.module(79): RestrictTabView->removeTabs('Settings', Object(ProcessWire\HookEvent)) #1 /wire/core/Wire.php(383): RestrictTabView->afterBuildForm(Object(ProcessWire\HookEvent)) #2 /wire/core/WireHooks.php(825): ProcessWire\Wire->_callMethod('afterBuildForm', Array) #3 /wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageEdit), 'buildForm', Array) #4 /wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(531): ProcessWire\Wire->__call('buildForm', Array) <snip> This causes ajax loaded repeater items to fail. Guarding the call seems to fix it... if ($pn instanceof Inputfield) { $pn->wrapAttr('style', 'display:none;'); }
-
Not sure, but have you tried "ProcessWire" rather than "Processwire"
-
@neosin Sorry for the slow response to this, but I just updated both the 2-Factor authentication module (for PW3+) and the CryptoPPP library module (switched it to OpenSSL.) If you still want to, try grabbing the latest version 3.1.1 and that should work under PHP 7.2.
-
@Alexander Just in case you are not aware of it: PW utf8 Normalisation Textformatter (but I suspect you are.)
-
Sublime PW - a Styleshout template based site profile
netcarver replied to wbmnfktr's topic in Themes and Profiles
@neophron Just had a look at your site in the temp subdomain. All looks good, except near the bottom of the page... -
Hi @Alexander I like the idea and hope the business goes well for you. Thanks for the offer code too!
-
@adrian That seems to work well for my purposes. Thanks to you and @Robin S!
-
@adrian Thanks for the reply. That seems strange - I would have thought the collapsedHidden status would have included it in the form as a hidden input. For now, I'll just use a hook in my site/ready.php to hide the unneeded tabs as I don't want have any module updates remove changes. Thanks!