-
Posts
991 -
Joined
-
Last visited
-
Days Won
3
Everything posted by PWaddict
-
[SOLVED] Required only if with required field action issue
PWaddict replied to PWaddict's topic in General Support
@Juergen Can you please help me to fix this with a hook? I'm trying to change the required attribute to 0 of my pagetable field right before the page is saved but it doesn't work: $wire->addHookBefore('Pages::saveReady', function(HookEvent $event) { $page = $event->arguments(0); $field = $page->mypagetable; if($page->template == 'mytemplate' && !$page->mycheckbox) { $field->required = 0; } }); -
On my template's "Required field action" is set to Unpublish the page. I have a Page Table field inside that template with the condition "Required only if". So when a checkbox is checked the Page Table field is required. The problem is that if the checkbox is unchecked so the Page Table isn't required when I save the page it gets unpublished with the error: "Session: Page unpublished because field "test_pagetable" is required" then I can publish the page again without issues then if I save the page again it gets unpublished with the above error and so on...
-
A hard reset and a reboot fixed the problem Thank you all for trying to help.
-
Haven't call my ISP yet cause I thought to do 1 last thing. I disconnected my router and connected to internet from an old router and now everything is working fine. So the problem is caused by the newest router. I guess I should hard reset it.
-
Same problem with incognito mode. I've already tried the above commands. I'm gonna call my ISP.
-
@pwired I've already rebooted my router multiple times. I switched to google's dns (8.8.8.8 and 8.8.4.4) but I'm having the same problem. I haven't uninstalled my antivirus, I've only temporary disabled it.
-
I have on idea why suddenly I can't access specific sites like github.com, gravatar.com (which means I can't see your gravatars here on PW forum), my bank's e-banking site and others. I tried to access them with different browsers but no luck. I'm getting the error ERR_CONNECTION_TIMED_OUT and when I'm running the Windows Network Diagnostics I'm getting this: I used the command ipconfig /flushdns, I rebooted my router, I disabled Avast Free Antivirus and still I can't access them. What should I do to fix it???
-
[SOLVED] Impossible to delete the defaultValuePage
PWaddict replied to PWaddict's topic in General Support
Somehow I didn't notice the Unselect button. Thank you @teppo -
Once you select a page on the Default value (when empty) option (defaultValuePage) under Details tab on Image/File fields then it's impossible to delete it. I can only change the page.
-
Return events from today and in future using date field
PWaddict replied to a-ok's topic in General Support
If it returns anything it will probably be the current date/time as a UNIX timestamp. -
Return events from today and in future using date field
PWaddict replied to a-ok's topic in General Support
Sorry but I don't understand your question. I'm using >=today in my date's field on selector in order to get today and future events and it's working fine. -
Return events from today and in future using date field
PWaddict replied to a-ok's topic in General Support
Don't delcare $today. To get today and future events you have to remove the $ from today on the selector: template=detail, detail_date>=today -
Here is how I did it var xhr = new XMLHttpRequest(); xhr.open('POST', '../my-url/', true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { document.getElementById('output').innerHTML = this.responseText; } }; xhr.send('test=' + response.test + '');
-
How to properly convert the below simple jQuery code to vanilla Javascript? $.post('../my-url/', { test: response.test }) .done(function(data) { $('#output').html(data); });
-
Instead of adding this to admin.php, I've added it to init.php. It's ok right?
-
Disable page/url for specific language
PWaddict replied to synapse's topic in Multi-Language Support
Here is how I fixed that: $settings = $pages->get("template=settings"); $language = $user->language; if($settings->featured_post && $settings->featured_post->viewable($language)) { echo "<a href='{$settings->featured_post->url}'>{$settings->featured_post->title}</a>"; } -
Disable page/url for specific language
PWaddict replied to synapse's topic in Multi-Language Support
Having a Page Reference field that displays a specific page content on the entire site if I go and uncheck the Active attribute on the additional language I'm still getting the content of the deactivated language. -
I've already switched to the CSS solution but yeah sounds good about what you did. You should officially update the module.
-
Thanks for trying to fix this but I'm thinking to uninstall the module and just hide the Settings tab with CSS.
-
Yes, I'm running RestrictTabView too.
-
@adrian I noticed that if a non-superuser change the title of an additional language that page name will not be renamed.
-
@Ivan Gretsky I'm glad that you're using it. Unfortunately I don't know how to remove the hidden pages from the count. If someone can do it please send me a PR. I do not suggest hiding the pages from the Super user cause it might be annoying if you might need to edit them in the future.
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
PWaddict replied to ryan's topic in Modules/Plugins
I've sent a PR to @ryan that adds support for lazyload plugins. -
Adds a class="external" and a rel="nofollow" to every external link by default. Optionally adds a rel="noopener", a rel="noreferrer" and a target="_blank". Note: This module is based on TextformatterMarkExternalLinks and some improvements of @teppo that were never implemented due to module's author inactivity. Download TextformatterOptimizeExternalLinks Requirements ProcessWire 3.x Changelog 1.0.0 (3 April 2018) Initial release
-
- 11
-
-
@mel47 On my code I have it like this inside the head section and works perfect: <script src="https://maps.googleapis.com/maps/api/js?key=<?= $modules->get("FieldtypeMapMarker")->get("googleApiKey") ?>"></script>