- 
                Posts370
- 
                Joined
- 
                Last visited
Profile Information
- 
											
												Location
												Montréal, Canada
Recent Profile Visitors
		
			7,480 profile views
		
		
			
		
						mel47's Achievements
 
									Sr. Member (5/6)
99
Reputation
- 
	Thanks! Simple thing but, now, I know which module is the cause. Still have to found the solution though! 😉
- 
	mel47 started following How to use lazycron? , How to debug random errors , PageimageSource and 1 other
- 
	Hi, I have randomly some errors in my log. I have no clue where to start to find the cause. It's either on "/" page or some inexisting pages. Is it an incompatible module or something with a fieldtypetext? I upgraded all modules and could wait to see if it disappears but except that I don't know where to search. If someone is willing to explain how they debug this kind of errors, I will appreciate so much! Mel Fatal Error: Uncaught Error: Class 'FieldtypeText' not found in /wire/modules/Fieldtype/FieldtypePageTitle.module:17 Stack trace: 1. /wire/core/ModulesFiles.php(324): include_once() 2. /wire/core/ModulesLoader.php(682): ModulesFiles->includeModuleFile() 3. /wire/core/Modules.php(667): ModulesLoader->includeModule() 4. /wire/core/Modules.php(574): Modules->includeModule() 5. /wire/core/Fieldtypes.php(194): Modules->getModule() 6. /wire/core/Fields.php(203): Fieldtypes->get() 7. /wire/core/WireSaveableItems.php(260): Fields->makeItem() 8. /home/xyz/domains/omn Line 17 of /wire/modules/Fieldtype/FieldtypePageTitle.module
- 
	Hello! I'm wondering if it's possible to convert webp all filetypes except png? I have a strange result with it (it look pixellized). Thanks Mel
- 
	Hello! I used this module to link images from different fields. It "kind-of" working. Meaning, thumbnails are well created. But some images are not saved. I realized that some images get renamed and have so many variations. Is it possible it's because I add images to imagefield on page 1065 and PW tries to create all versions again and again? How I can create an array of images that will not have this behavior? Hope it's clear... Thanks Mel $wire->addHookAfter('FieldtypeDynamicOptions::getSelectableOptions', function(HookEvent $event) { // The page being edited $page = $event->arguments(0); //if we need 2 image_selection make a condition for page // The Dynamic Options field $field = $event->arguments(1); //images on parameters page $par = $event->wire()->pages(1065)->images; //last image for webinars and adding them to previous images foreach ($event->wire()->pages(1042)->content_blocks->find("repeater_matrix_type=2") as $p) { $all = $par->add($p->images->last()); } // For a field if($field->name === 'image_selection') { $options = []; // Get Pageimages within the "images" field on the home page foreach($all as $image) { // Add an option for each Pageimage // When the key is a Pageimage URL the inputfield will automatically create a thumbnail // In this example the label includes the basename and the filesize /** @var Pageimage $image */ $options[$image->url] = "{$image->basename}<br>{$image->filesizeStr}"; } $event->return = $options; } });
- 
	I already have area and number separated. My issue is about the number only. We have to type without dashes, but since no one is normally doing that, some confusion arises and they always have an error (and they need to remove the dash they typed to get a valid answer). So yes, if the dash could be strip somehow, it will be ideal!
- 
	Hello Adrian, Just a quick question. I have set output to NorthAmericaDashes. I was wondering if I can set input to fit the output. I use the fieldtype in my FormBuilder and user complains that they don't know the format to use since it's not as usual. They want 123-4567 but we have to enter 1234567 to avoid errors. Is it possible to do that? Thanks again!
- 
	Thanks a lot! Works now!
- 
	Hum... Is it possible to have the same module not at the same version ? When I go to upgrades, for the first one, it's said it's not tracked by module directory. For the second, it's the latest version. BTW, I downloaded this module just yesterday.
- 
	Hi @Robin S I have a problem with your module. It detected links but the table is completely empty. Checking console, I got those errors : JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate-quiet-1.4.1.min.js:2:552 La mise en page a été forcée avant le chargement complet de la page. Si les feuilles de style ne sont pas encore chargées, cela peut provoquer un flash de contenu non stylisé. JqueryCore.js:1:91295 Échec du chargement pour l’élément <script> dont la source est « https://XXX/site/modules/VerifyLinks/datatables/datatables.min.js?v=0.2.2 ». verify-links:93:102 Uncaught TypeError: $(...).DataTable is not a function <anonymous> https://XXX/site/modules/VerifyLinks/ProcessVerifyLinks.js?v=0.2.2-1727405204:7 jQuery 4 ProcessVerifyLinks.js:7:21 <anonyme> https://XXX/site/modules/VerifyLinks/ProcessVerifyLinks.js?v=0.2.2-1727405204:7 jQuery 4 Do I miss something to install? PW 3.0.241, VerifyLinks 0.2.2. Didn't work both on my computer (localhost) and online server. Mel
- 
	Hi, I read and re-read the page about lazycron but there is something I really don't understand. Where I should put this function? Does the hook and the function should be on the same page? Does the template should be a page related to the function? Or I should create a template specifically for this? But if so, I guess this template have to be published and visited? My goal is to send an email weekly. Thanks!
- 
	Hi, Thanks for this solution, that I was looking for. Are you aware if it have a limit of number of pictures? Or maybe it's my code which is not optimal but strictly talking the code is good. I just add a loop to get all images on all pages with template meetings. However I got fatal error (30s execution time). The original code searching on only 1 page (having 50 pictures) is fine. But on total, I have for now no more than 55 pictures for all my PageImages field. Is it a way to make it more efficient? Or I should just have many fields for the different meetings? Thanks Mel $wire->addHookAfter('FieldtypeDynamicOptions::getSelectableOptions', function(HookEvent $event) { // The page being edited $page = $event->arguments(0); // The Dynamic Options field $field = $event->arguments(1); // For a field named "select_images" if($field->name === 'image_selection') { $options = []; // Get Pageimages within the "images" field on the home page foreach($event->wire()->pages->find("template=meetings") as $p) { foreach($p->images as $image) { // Add an option for each Pageimage // When the key is a Pageimage URL the inputfield will automatically create a thumbnail // In this example the label includes the basename and the filesize /** @var Pageimage $image */ $options[$image->url] = "{$image->basename}<br>{$image->filesizeStr}"; } } $event->return = $options; } });
- 18 replies
- 
	
		- inputfield
- images
- 
					(and 2 more) 
					Tagged with: 
 
 
- 
	Hi, I try to code something I've already done in another context, but since field is a text than a page, it seems to doesn't work exactly the same. foreach ($prize as $awardees) { $year = $awardees->year; //Problem is here; I got many times each year echo <h3>{$year}</h3>; //output : 2024 2023 2023 $allbyYear = wire('pages')->find("has_parent=1153, year=$year"); foreach ($allbyYear as $winner) { echo $winner->title; // output winner1 winner 2 winner 3 winner 2 winner 3 } } How I could only have 2024 and 2023? Thanks Melanie
- 
	Hello @Ade I can give you my opinion as a non-professional, building websites (now at the fourth, over 6-7years) on my free time for organizations I work as volunteer. As others said, you will definitely have to learn PHP but honestly my basic knowledge of loops and functions is quite enough to do get a pretty impressive result. For sure, you will need to invest time, way more than those experienced people. And code will not be as optimized, but it works... However I can't emphasize enough how helpful and kind are the people in this forum. If you show you did an effort, you will never receive those passive-aggressive "RTFM" answers as in my previous CMS forum... So if it's a project on which you want to invest time and efforts, you will get way better satisfaction than with a premade website builder (which apparently you already tried). PW is not dependent of a type of website (or doesn't have a big catalog of theme) and you can build whatever you want. Which is cool but could scary coding beginners as us. However, docs, forum and examples provided at download are quite enough to start your first structure and have a functional blog. I oversee however you may need help from community for some more advanced functions. Which is fine. I clearly see amelioration from my 1st website to the current one, so if you focus on only one project, chances are it will become quite good!! Good luck! Mel
- 
	Thanks, success! For the sake of ulterior reference : str_replace($short, '', $person->content);
- 
	Hi No success on forum unless I didn't have the good keywords... I created a short sentence using $short = sanitizer()->truncate($person->content, 150); But then I want to remove this sentence from the content. The usage is a accordion (clicking the sentence open the full text, but without repeating the same sentence again). Thanks! Mel
 
         
                 
	 
	 
	 
	 
	 
                    