Jump to content

Marco Ro

  • Posts

  • Joined

  • Last visited

Everything posted by Marco Ro

  1. I have not been able to understand why in the language change some images return null value while others do not. So, I inserted the images in this way: $ima_small = $page->getInputField('image_card')->getImage(); $ima_big = $page->image_card; if ($ima_small!=null) { $ima_small = $ima_small->width(400); // echo '<img class="ima_normal" src="' . $ima_small->url . '">'; } else { echo '<img class="ima_normal" src="' . $ima_big . '">'; } Surely it is not the most elegant solution! but maybe this can be used to some one.
  2. Here it's possible find the Italian version: https://github.com/MarcooRo/IT-it-processwire (If need I can add the zip file here.) I have also translated some moduels like the languagesupport module. I miss only two modules to translate, if not need now I'll do them in September. They are the comment module and AdminThemeUiKit. I think to have translate all files, but If I miss something let me know. Cheers!
  3. Thank you @theo, I'm sorry but I don't know how to make the var_dump or debugger in module. so, I will study how do it and I will try to make the check. yes, I have upload the module to the last version. Thank you again.
  4. Yes it's is true, but only in one language, me to I don't know why in the default language work well. Thank you @theo for the advice and for the help. Unfortunately I don't think I can do what you say. I tried but I'm sure it's not this that I have to do. $image_big = $post->getInputField('image_card')->getImage(); // this one is form ImagenPicker $image_small = $image_big->width(600); var_dump($image_small); object(ProcessWire\Pageimage)#609 (2) { ["changes"]=> array(1) { [0]=> string(8) "basename" } ["data"]=> array(6) { ["basename"]=> string(31) "karya_220x118x74_cara.600x0.jpg" ["description"]=> string(0) "" ["tags"]=> string(0) "" ["formatted"]=> bool(false) ["modified"]=> int(1523373826) ["created"]=> int(1523373826) } } If I do this in the second language give me: Call to a member function width() on null. I'm not sure this is the var_dump that I have to do.
  5. Hi, I have a problem with resize images in a multi languages website. If I use the size() or width() the image give me back a null result. This one is an example of my code: $image_big = $post->getInputField('image_card')->getImage(); // this one is form ImagenPicker $image_small = $image_big->width(600); echo '<img src="' . $image_small->url . '" alt="business furnitur playwood">'; The ImagenPicker module work well, I don't think the problem is about this. This code in the first language work well and the image are resized. But when I change language give me this error: Error Call to a member function width() on null Some one the help me to understand why this happen? Thank you.
  6. ( Sorry again @kongondo, you're right I'll be more careful in the future ) So, Some time, I do not understand why, the modulo deletes some images. I notice when a user enters these pages and in the backend appears the 404 error, I go to check inside the media library page and in fact the images inside the media manager are gone. Someone knows why and what can I do?
  7. Hi, Some time, without a reason, the modulo deletes the images. Do you know why? I notice when a user enters these pages and in the backend appears the 404 error, I go to see and in fact the images inside the media manager are gone. Someone knows why and what can I do? -- Sorry @kongondo!!!! I'm really sorry I got confused with Media Library module!!! ??
  8. Hi @horst, probably in July I will have time for do it. It's ok if I just export with the download zip button the file?
  9. ok! thank you for explanation @ryan. I have already changed the code with yours, only using page, since I do not need to have input at the moment.
  10. thank you @ryan! Yes you understood well it's about LoginRegister module. I will keep your solution like plan B if the robots.txt file for some reason it don't will work! About the rel canonical I just added it too. But I had added it this way: <link rel="canonical" href="<?php echo 'https://'.$_SERVER['HTTP_HOST'].$page->url; ?>" /> I don't know if the correct way. I tried your <?=$input->httpUrl()?> and give me back the same url.
  11. If I use if ($img!=null) and echo the image not print nothing in the html output. If I use if ($img == null) in the html I can see the tag img but empty. This what mean that give me beck an image object, but why do this ? I don't know if you can help me, but where I can check ?
  12. I try to install the PaymentInvoice after has deleted. When I upload the file via ftp or backend show up an server error 500 and all website is out, when I delete and go in error log I see this error: Error: Class 'PaymentModule' not found line 3 The line 3 is: class PaymentInvoice extends PaymentModule All look correct, why I have this error ? I have the last version of Padloper. On localhost when I install the module also give me the error but if I delete the namespace ProcessWire; everything work well. In the live version this trick doesn't work ? Some one can give me some advice?
  13. Thank you @entschleunigung. Interesting reading I also find this link https://geoffkenyon.com/how-to-use-wildcards-robots-txt/ which has the ways of use with examples. In my case it seems that the correct syntax is: Disallow: /*?forgot=1 Disallow: /*?register=1 or Disallow: /*?forgot=* Disallow: /*?register=* I don't think there are a lot of different with Disallow: *?forgot=1 I see use this in other website. anyway will see if this will work. I hope I do not see all those errors in the Search Console.
  14. Thank you very much @theo. I tried it just now. So, I tried to use in different pages. In one page works. But In other no. I tried to understand way but I couldn't find a solution. In the fist language it always works. I the other language in the page doesn't work give me a Call to a member function width() on null if I delate the width give me back a src="unknow". I know you are busy so, I will try again to debug in the next days.
  15. Hi guys, I notice in the Google Search Console a lot of error about a specific link, eg: site/page it's ok but site/page/?register=1 or site/page/?forgot=1 give me a lot of problem about targeting, metadata duplicate and title duplicate. I already add a rel='nofollow' in the specific link, but it's not enough. This work just for the directly link. Inside the robots.txt I add Disallow: *?forgot=1 and Disallow: *?register=1 but I'm not sure if this works. Before I tried to write Disallow: /?forgot=1 but this did not work. Some one know how to stop to index the URLs that I end up in this way ? Thank you!
  16. I try look if I can do something, but with me poor skill I think I need your help. I know your are busy, hope to not disturb too much. Maybe the issue is in the InputfieldImagePicker, could be add extra $field->set ? so that the url can change based on the change of the main URL. And also, add the possibility to resize the width? I'm nor sure if InputfieldImagePicker is the right place to make these changes. anyway if you are busy it's ok, np.
  17. Hi @theo, I tried to fix this but I can't find the way. I think the problem is about the url. I try to debug but there are different situation and I can' find a patter. So, in home page in the pre-set language this work: <?php $image_forni = $page->getInputField('ima_2')->getImage()->width(600); echo " <img src='" . $image_forni->url . "'>"; ?> But If I change language not work. give me Uncaught Error: Call to a member function width() on null I tried $page->getInputField('ima_2')->getImage()->url in this way for the second language the error is Trying to get property of non-object Inside the page where the url have the language path is like site.com/en/page work in both languages <?php $image_forni = $page->getInputField('ima_2')->getImage(); echo " <img src='" . $image_forni->url . "'>"; ?> But if I use $image_big = $post->getInputField('image_card')->getImage()->width(600); give me back an error in both languages Fatal error: Uncaught Error: Call to a member function width() on null I don't know if this can help you, if you don't have time maybe can give me some tips? Thank you!
  18. Hi @theo, Do have you ever tried to use api for get the url in a multi language website? Because I notice a problem with the code above. maybe I wrong something, the problem is only when I use a different language. At moment If I switch to the second language I see the error page with this error: "Call to a member function width() on null" or size() Do you know why? What did I do wrong?
  19. I see this notice: [InstagramFeed]: No data was received for 'nome_user' (recentmedia). [InstagramFeed]: No user 'nome_user.it' was found. I use the correct user name and I checked all the keys access and these are correct, also the token. I saw that the account registered the permission to use my app. So, I don't know maybe I miss something... What I can check ? FIXED: In the end I find that if I disable implicit OAuth and not force the signed requests everything works well. btw I don't know if is a good things! UPDATE: I still see this error in the log page every time some one visit the page: [InstagramFeed]: No user 'xxx' was found. The page work well, but why I see this error and how I can delete it? Thank you
  20. Sorry @theo ?! I don't know way I looking in all forums but not in your documentation!! sorry! btw post the answer here just if some one will need: <?php $features = $pages->find("template=single-design"); ?> <?php foreach($features as $product): ?> <?php $image_big = $product->getInputField('image_card')->getImage(); $image_right = $image_big->size(250,250); ?> <img src="<?= $image_right->url ?>"> <?php endforeach; ?>
  21. Hi, I have a problem to use the size api for resize the images. This is an example of my situation: <?php $features = $pages->find("template=single-design"); ?> <?php foreach($features as $product): ?> <?php $image_big = $product->image_card; $image_right = $image_big->size(250,250); // this give me error "call to a member funtion size() on null" ?> <img src="<?= $image_right ?>"> <!-- If I use $image_big the images show up correctly --> <?php endforeach; ?> What I can do for resize the images? I also have try to use the api like in the manual ? - But if I use url the images never show up, also first() doesn't work. $image = $page->images->first(); $thumb = $image->size(100, 100) echo "<img src='$thumb->url'>"
  22. I thought you could do something like that: Maybe it's possible do only with some tag like recipe. (I can't confirm on this pasta) Absolutely yes, you have to spend some money in adWords. There are a lot of works to do for show up a good snippets, and in the end the best things it's just pay Google. The images in the middle are a good things, also we have start to setup the Google Merchant (which is very complicated again) for make the shipping campaigns.
  23. Hi, I use Media Library module, sometimes does this: I upload an image, save the page, go out and when came back the image is delete. Does it happen to you sometimes? Some one know why? and what I ca do? Thank you At moment I fix this just making a new page, in this way work the images aren't deleted, maybe could be a memory problem. I don't know.
  24. Thank you @wbmnfktr. Yes we take the truck of the pages, we will compare the pages. Do you think the product image will show up? Now there is the new url so maybe need just wait some days. (hope)
  25. Yes sure this is what I use for the product page if($page->template == "single-connectors"){ $products = array( "@context" => "http://schema.org", "@type" => "Product", "aggregateRating" => [ "@type" => "AggregateRating", // I know this is not good "ratingValue" => "4.5", "reviewCount" => "3" ], "brand" => "PlayWood.it", "description" => $page->Description, "name" => $page->title, "image"=> $_SERVER['HTTP_HOST'].$page->image_card, "offers" => [ "@type" => "Offer", "availability" => "http://schema.org/InStock", "price" => $page->pad_price, "priceCurrency" => "EUR", ], "audience" => [ "@type" => "BusinessAudience", ], ); } If you want you can check this link there is the live example of this page. I added it inside the header.
  • Create New...