peter8nss
Forum Replies Created
-
Coding my own (complex) validation when the product already has it seems like a somewhat backward step.
As far as I understand it, “required” and “phone format validation” are separate validation checks (and they can be selected independently). Would it be possible for the “phone format validation” to let through blank as a valid number? Leaving it to the “required” check to reject it (or letting it through if optional).
Apologies for the delay in testing the workaround. I don’t think it works, because if there is a phone validation error I can’t submit, so hook ‘forminator_custom_form_submit_errors’ doesn’t fire.
I fully accept that search not available to logged on users is never a scenario you’d want, but it was the simplest way for me to illustrate to you the problem with negation rules and searches.
I’ve retested on 2.0.10:
- I’m still seeing the problem.
- Changing “Exclude Administrators” didn’t seem to solve the problem either.
- Nor did reversing my actual restrictions
I think my second post to this thread is probably the clearest explaination of what I’m actually trying to achieve (rather than the contrived but simple test case in my third post on the thread).
Let me know if you need any more input. Is there any way the code could have a debug hook to say which posts it was assessing, what rules were tested and their result?
That didn’t seem to help,
I did try hooking ‘content_control/content_has_restriction’ and noticed that the content that matches the “not” rules doesn’t seem to be marked as “having a restriction”. Which I suspect stops a lot of subsequent processing happening.
I’ve also tried a much simpler set of restrictions which I think you will easily be able to recreate:
- Restriction 1: Logged out users, Redirect (Hide), Content Is A Search Result Page
- Restriction 2: Logged in users, Redirect (Hide), Content Is Not A Page
So search page is available when not logged in (but not when logged in). For people who are not logged in the Search results should not include any content with post type other than “page”.
Unfortunately, I get posts <span style=”text-decoration: underline;”>and</span> pages included in the search results (the posts shouldn’t be – as restriction 2 should stop this). When I click on the posts I do get login redirect firing (which is correct). And when I click on a page that displays (which is also correct).
I want the search page to be visible to all users. It is what shows up on the page that I want to limit (using the “hide” functionality). Note the pages that shouldn’t be showing up on the “logged out” search page, do still correctly enforce the “redirect & login” if I click on them. It is only the “hide” that is not working.
My model has three types of page (marked using a cutom taxonomy):
- Super-user – logged in with specific roles
- Member – logged in
- Public – not logged in
A simple hierarchy applies. So a super-user can see all three and members the last two. To make my editors’ job simpler, pages default to “Member” so only the super-user and public pages need to be marked as such.
The problem is that I can’t specify a rule that allows “logged in” and “logged out” users to see public pages (because I have to specify one or the other for a restriction). Therefore I have to identify the member pages as “not public” using negations. And, because I want the search page to be available to all, I have to exclude that page from the “not public” restriction too.
Further investigation suggests that lazy loading doesn’t work when the gallery is inside a floating container. Clearly, something I can work around, but maybe be worth noting in case anyone else is seeing a similar problem.
Thanks for getting back to me. I’ve created a really simple form using the latest version of plugin and saved it at https://pastebin.com/hHweyCVs.
Repeating group has three elements: Radio, select 1 and select 2. Which of the selects is visible depends on the radio selection.
Use form to fill in two items and then save as draft. Retrieving the draft: item 1 is fine, but item 2 shows both the selects – only one should be showing.
Still a problem in 1.25.1. Any indication when there might be a fix for this?
I’ve had another look at this. The problem seems to depend on which template from our theme I use. With some templates, I get no lazy load (e.g. the page I shared earlier). With some other templates it works fine.
I can confirm that changing the “Lazy Load Number” successfully alters the number of images initially displayed, but I’m still not seeing any additional images being loaded when you reach the bottom of that set.
I can confirm that has fixed the problem with shortcuts.
Maybe worth noting that I had to deactivate and activate the plugin as a part of the upgrading to the new version. I think this was because of changes to database table
wp_integrate_google_drive_files
– specifically [Unknown column ‘extension’ in ‘field list’].Thanks. Should be accessible now. I’d forgotten to save the setting that makes it public.
Thanks for the prompt response. Lazy load would be great, although it would be nice to be able to control the size of that.
Are far as I can tell Lazy load isn’t working. I’ve tried my gallery with a couple of browsers (Mozilla Firefox and Microsoft Edge) in case it was a browser specific issue.
The actual page I’m working on is behind a login, but I’ve created a public page that demonstrates the problem. Hope that helps.
Forum: Plugins
In reply to: [Image and video gallery from Google Drive] Guzzle coflictsThanks for the prompt response. Conversation moved to GitHub as suggested.
I think the problem is that in render_shortcode there is a call to igd_is_dir. If the “file” being tested is a shortcut to a folder it will return false because the type is ‘application/vnd.google-apps.shortcut’ not ‘application/vnd.google-apps.folder’. In the case of a shortcut, you probably need to consider targetMimeType too.