Jump to content

diogo

Moderators
  • Posts

    4,287
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. Interesting, should work, but can you try with the debug option instead? You can also with the manual option if that doesn't work. It would at least get you going with the work while you check what's wrong with this.
  2. Just follow the instructions on those messages. Add one of the suggested options to the end of your config.php file. This file is situated in the "site" directory of your Processwire install. Be aware that the debug option should be used only only on non public websites, so don't forget to remove it when you publish. Or just use the second option to always allow installing modules via upload. You can also add modules manually via ftp, as you can see on the bottom of your screenshot. Make sure to get yourself acquainted with how to install modules https://modules.processwire.com/install-uninstall/
  3. When you click the edit icon on those rows, does it open a contact page? Also, in the "Table fields to display in admin"area, did you write the names of the fields exactly, including text case, as they are stated on the yellow note below it?
  4. If the system is working well, and all you want to change is this detail, you can can use the Page Table field (it's in the core, you just have to install it). If all you want is to have an easy way to look at those contacts, and don't mind still having those pages as children, just create a "ProFields: Page Table" field, set "Select one or more templates for items" to "contact", and leave "Select a parent for items" empty. Then add this to your code right after $p->save(); $contacts_page = $pages->get("/contact/"); $contacts_page->of(false); $contacts_page->contacts->add($p); // assuming the name of the new field is "contacts" $contacts_page->save(); If, for any reason, you don't want the pages as children of the contacts page, you can create a page only for this purpose, and set it as the value to "Select a parent for items" in the field. Then you just have to replace $pages->get("/contact/") in the code by the correct parent.
  5. Ok, just out of curiosity, you mentioned you develop locally on XAMPP on macOS, I'm assuming that this problem is happening on the remote server and not on the local server, right? If so, is it a shared hosting German provider? Would be really strange if they don't have the German locale installed... If I assumed wrong, and this is all happening on XAMPP, then I guess you're right and you don't need to worry too much, as it will likely work when you transfer it to the remote server.
  6. Last one. Try adding these 'de_DE@euro', 'de_DE', 'de', 'ge' to the end of the setlocale function to see if something comes out. echo setlocale(LC_ALL, 'de_DE.UTF8', 'de.UTF8', 'de_DE.UTF-8', 'de.UTF-8', 'de_DE@euro', 'de_DE', 'de', 'ge');
  7. diogo

    nvm

    I'm not really sure if a forum about technology full of strangers is the best place for you to open up in this way, but I trust and hope that in this community you won't be made fun of. I won't pretend to have understood most of what you expressed – I didn't – and although I respect the vulnerable place you find yourself in, I don't think I could be of much help myself, so the purpose of this reply is solely to try to break a silence that must be heavy on you, and initiate a positive and respectful spirit on the responses.
  8. You still didn't say what is the result of echoing setlocale(LC_ALL, 'de_DE.UTF8', 'de.UTF8', 'de_DE.UTF-8', 'de.UTF-8') ? Fair enough that you don't want to continue trying. Just keep in mind the purpose of this check, in case you have a related problem in the future. Has written in the code: * Warning about servers with locales that break UTF-8 strings called by basename * and other file functions, due to a long running PHP bug If you don't have ssh access to the server, you can also do this inside php var_dump(\ResourceBundle::getLocales(''));
  9. "C" is the default value for the the "C" field in the translations, so I'm guessing it's taking it over your "de_DE.UTF8" , I noticed that you are mixing different locale languages on that call to setlocale. The idea is to add different forms of locales for only one language, to find out which one is recognized by the server. Can you try exactly what I suggested above, and see which one of them is echoed? <?php echo setlocale(LC_ALL, 'de_DE.UTF8', 'de.UTF8', 'de_DE.UTF-8', 'de.UTF-8');?> Also, a correction to what I wrote before: If you add a list of locales to the "C" field, you should add them separated by commas, but without the quotation marks. de_DE.UTF8, de.UTF8, de_DE.UTF-8, de.UTF-8 instead of 'de_DE.UTF8', 'de.UTF8', 'de_DE.UTF-8', 'de.UTF-8' I modified my other post to reflect this.
  10. Also, what do you get when you echo this? echo setlocale(LC_ALL, 0);
  11. The message suggests that the en_US.UTF-8 is already set in the "C" entry, so I guess the problem is that the server doesn't understand with that format. You can try to add several formats to that field so the server can use the one that it understands. Just enter them separated by commas: de_DE.UTF8, de.UTF8, de_DE.UTF-8, de.UTF-8 ...or add this to a file, and it will echo the first locale that is recognized by the server. Then you'll know which one to use: <?php echo setlocale(LC_ALL, 'de_DE.UTF8', 'de.UTF8', 'de_DE.UTF-8', 'de.UTF-8');?>
  12. I had a go at something like this a few years ago, exactly after I played a bit with the Perch trial. It didn't gain much traction and I never got to develop the concept further, but what I had was working flawlessly.
  13. Softaculous doesn't provide hosting. If the hosting supports Softaculous, usually they will say it clearly in their marketing and prices page ("One click install over 400 applications!!" or something like that). I think this means that all Softaculous applications will be provided, but I'm not sure if the hosting can cherry pick. Softaculous gives you the choice to install via ftp from their web interface, but I don't see an advantage on doing that. As an example, check the info provided by a2 https://www.a2hosting.com/kb/installable-applications/softaculous/manage-your-applications
  14. You could try any shared hosting with softaculous. Just checked the demo on their website, and it's up-to-date https://www.softaculous.com/apps/cms/ProcessWire
  15. Reopening the offtopic for a moment ? I guess life takes people in other directions. That's not my case though (the older ones must remember me a bit ?). Still working with ProcessWire every day, and I'm hugely thankful to Ryan for this. Just not posting much lately. I have a bunch of sites to add to the directory and have to find a bit of time and will to do it. Aside from Processwire I'm also exploring Svelte and the very new (still in Beta) SvelteKit. They don't replace Processwire though, and can even be complementary if Processwire is used as a headless CMS. I started a new thread, so the discussion can go on without getting on and off topic all the time
  16. Where do you want to import the captions to? To the description of the image, to a custom field on that image, or to a separate field in that repeater item? For the first and second you would just add this line before saving the new item: $newItem->post_image->description = "whatever"; or: $newItem->post_image->custom_field_name = "whatever"; For the third you would add something like: $newItem->field_name = "whatever";
  17. Kind of unrelated with the topic, but this is pretty funny ? https://pudding.cool/2020/12/judge-my-spotify/
  18. And one more http://youmightnotneedjquery.com/
  19. Try: $pages->count("has_parent=$child, template=tops, projekt_top_vermietet=1") notice that I changed the single quotes to double quotes, so the variable inside them can be evaluated.
  20. You couldn't use that action anymore, since you're not be adding each file to an image field, but instead you'll be adding a new item to a repeater field AND adding the image to a field in that newly created repeater item. You can copy that action to create a new action that does that. Looking at the code of that action https://github.com/adrianbj/ProcessAdminActions/blob/master/actions/FtpFilesToPage.action.php, in the defineOptions() function, and assuming that the existing 'field' option would hold the repeater field, you'd need to create a new 'image_field' option to hold the image field inside the repeater. Then you'd need to update the code inside the executeAction() function to create the repeater items. In line 78 you'd have something like (written on the knee and not tested): $newItem = $destinationPage->$fieldName->getNew(); $newItem->$imageFieldName->add($item->getPathname()); $newItem->save();
  21. I was thinking: "Ideally you would be able to drop all images in a repeater field, and it would a repeater page for each image, and upload each of them to a predefined field in that repeater"... then I just decided to google for it, and found this https://processwire.com/modules/repeater-images/ I'm surprised that I never came across this module by @Robin S, but it looks just awesome ?
  22. Have a look at Media Manager, by @kongondo. It has a cost, but it manages images as pages so you'll be able to add ant kind of field to an image. https://mediamanager.kongondo.com/
  23. @fruid I'm glad the module was useful for you ? I'm not planning to update the module, since I offered an alternative that I consider superior: I think you solved the situation well for your use case. I would advise you to simply change the class and file names of your customised version to prevent any unwanted update. I don't have time to look at it at the moment, but you could also add one more optional parameter to the short tag for the size of the image, and trigger the resizing with the passed value only if it exists. If you wish to share your changes, feel free to create a fork or submit a pull request. Whatever you prefer ?
×
×
  • Create New...