Jump to content

PWaddict

Members
  • Posts

    998
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by PWaddict

  1. I'm trying to get the url from the selected page by using the following code on template-1 but I'm getting the url from the current page of template-1. $related_page = $pages->find("template=template-2, mypagetable=$page"); if(count($related_page)) { ?> <a href="<?= related_page->url ?>">Related Page</a> <?php } ?>
  2. How to check if the current page from template-1 has been selected (using page field) from another page from template-2?
  3. When I try to save the page that includes one of the pair fields I'm getting the following error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp\htdocs\mysite\wire\core\Wire.php on line 1118Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0 Then I've updated my memory_limit to 512M and once again I'm getting this error: Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp\htdocs\mysite\wire\core\Wire.php on line 1118Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0
  4. It has been properly fixed. More info here.
  5. I fixed it. The solution is posted in the GitHub issue.
  6. Yes the rule is: mycheckbox=1 Have you selected the "Unpublish the page" on Required field action under Advanced on the template? You save the page over and over with UNCHECKED checkbox and the page doesn't unpublished???
  7. @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; } });
  8. 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...
  9. A hard reset and a reboot fixed the problem Thank you all for trying to help.
  10. 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.
  11. Same problem with incognito mode. I've already tried the above commands. I'm gonna call my ISP.
  12. @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.
  13. 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???
  14. Somehow I didn't notice the Unselect button. Thank you @teppo
  15. 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.
  16. If it returns anything it will probably be the current date/time as a UNIX timestamp.
  17. 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.
  18. 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
  19. 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 + '');
  20. How to properly convert the below simple jQuery code to vanilla Javascript? $.post('../my-url/', { test: response.test }) .done(function(data) { $('#output').html(data); });
  21. Instead of adding this to admin.php, I've added it to init.php. It's ok right?
  22. 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>"; }
  23. 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.
  24. I've already switched to the CSS solution but yeah sounds good about what you did. You should officially update the module.
  25. Thanks for trying to fix this but I'm thinking to uninstall the module and just hide the Settings tab with CSS.
×
×
  • Create New...