Jump to content

PWaddict

Members
  • Posts

    926
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by PWaddict

  1. How to manipulate page title on a hook after page save for ONLY the default language?
  2. On localhost where it's working properly I'm having 3 languages. On live server I have only 1 language and after I delete the other 2 additional languages on localhost the problem now happens there too.
  3. I'm using the following hook in site/ready.php to manipulate page title in admin section and it work fine in localhost but I just noticed that it doesn't work on live server. I'm always getting "Untitled" even though all 4 fields have values. $wire->addHookAfter("Pages::saveReady", function(HookEvent $event) { $page = $event->arguments[0]; if($page->template->name != 'mytemplate') return; if($page->myfield_text_a && $page->myfield_text_b && $page->myfield_options && $page->myfield_date) { $page->title = $page->myfield_text_a . ", " . $page->myfield_text_b . ", " . $page->myfield_options->title . ", " . $page->getFormatted("myfield_date"); } else { $page->title = "Untitled"; } }); How is this possible???
  4. I'm getting hundreds of PHP notices and 1 warning when visiting sitemap.xml url with debug enabled. With debug disabled everything seems ok. Using PW 3.0.165 and PHP 7.4.9. Notice: Trying to access array offset on value of type null in C:\laragon\www\mysite\site\assets\cache\FileCompiler\site\modules\MarkupSitemap\MarkupSitemap.module.php on line 413 Notice: Trying to access array offset on value of type null in C:\laragon\www\mysite\site\assets\cache\FileCompiler\site\modules\MarkupSitemap\MarkupSitemap.module.php on line 417 Notice: Trying to access array offset on value of type null in C:\laragon\www\mysite\site\assets\cache\FileCompiler\site\modules\MarkupSitemap\MarkupSitemap.module.php on line 427 Notice: Trying to access array offset on value of type null in C:\laragon\www\mysite\site\assets\cache\FileCompiler\site\modules\MarkupSitemap\MarkupSitemap.module.php on line 353 Warning: Cannot modify header information - headers already sent by (output started at C:\laragon\www\mysite\site\assets\cache\FileCompiler\site\modules\MarkupSitemap\MarkupSitemap.module.php:427) in C:\laragon\www\mysite\site\assets\cache\FileCompiler\site\modules\MarkupSitemap\MarkupSitemap.module.php on line 192
  5. Feel free to checkout my module https://github.com/PWaddict/TextformatterOptimizeExternalLinks where you can optimize all the external links.
  6. Use this: #wrap_Inputfield_scf-website { display: none; }
  7. @kongondo are you planning to add affiliate system?
  8. @MaierGrem I have already posted in the module's forum, and problem solved by @adrian. Thanks anyway :) Can a moderator please delete this topic, as it's useless. I didn't knew when created it that the issue was from a third-party module.
  9. modified: Unix timestamp of when Pagefile (file, description or tags) was last modified. mtime: Unix timestamp of when file (only) was last modified. Taken from Pagefile API Reference.
  10. Thanks a lot. I switched from mtime to modified and the problem is gone :) Maybe you should add a note on the Rename rules to avoid using mtime.
  11. Yep, I'm getting the same results with you.
  12. Hm, after I checked the "Overwrite existing files?" on image field the problem is gone. So, the module to properly work needs that option checked?
  13. Tracy displays them in orange color as orphans.
  14. The structure on my template is in this order: various fields Image field Repeater field Repeater field various fields The image doesn't display on frontend because it seems that it doesn't get saved in database??? I'm checking if the image exists like this: if($page->image) etc. There is nothing wrong in the code on template cause if I save the page AGAIN then this time the image is properly getting saved and displayed on frontend. Image Maximum files allowed: 1 Formatted value: Automatic EDIT: It's a multi-language site.
  15. Hello @adrian Today I noticed a very strange behaviour with the module. If I upload an image on the Image or CroppableImage3 field and then add a new repeater item on a repeater field and publish / save the page, the image doesn't display on front-end. The image and its variations are visible on back-end and on the related folder in assets. If I first add a new repeater item on a repeater field and then upload an image on the Image or CroppableImage3 field then there is NO problem. WTF? I verified that this is caused by the module cause when I temporarily disable the rule there was NO problem. My rule is: {$page->title}_{$file->mtime} with Rename on Save checked. I'm using PW 3.0.135.
  16. Hello. Today I noticed a very strange behaviour. If I upload an image on the Image or CroppableImage3 field and then add a new repeater item on a repeater field and publish / save the page, the image doesn't display on front-end. The image and its variations are visible on back-end and on the related folder in assets. If I first add a new repeater item on a repeater field and then upload an image on the Image or CroppableImage3 field then there is NO problem. WTF? I'm using PW 3.0.135. Can PLEASE someone help me? EDIT: It seems the issue is caused by Custom Upload Names module. I will post on the related topic.
  17. LimitRepeater can't lock repeater items.
  18. I would like to lock a specific repeater item with the id 1553 to prevent editing from non-superusers but none of the above work. Can you please help?
  19. @adrian I found a small bug. Using slashes for example on the title field the image doesn't rename properly. For example on title field I have: Poster/Flyer and the image renamed to flyer.jpg where it should be poster_flyer.jpg.
  20. Is it possible to prevent optimizing on upload on specific field via hook? Nevermind, don't need it anymore.
  21. I don't think it has to do with the settings of the images field cause I tried all of them and the problem still happens. The module can't retrieve properly the title of the vimeo video because on the image description I'm getting: array-1. When I enter a youtube url the title retrieved properly. The problem happens only on vimeo.
  22. When grabbing vimeo thumbnail I'm getting the following warning on debug: Warning: strlen() expects parameter 1 to be string, array given in C:\laragon\www\mysite\wire\modules\Inputfield\InputfieldImage\InputfieldImage.module on line 1262
  23. Currently I don't have time too. Maybe in about 2-3 months if you haven't added it yet I will try to do it.
×
×
  • Create New...