Jump to content

froot

Members
  • Posts

    729
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by froot

  1. also, sharing via facebook is not embedding the image. It seems to work fine with twitter and linkedin but not facebook. I'm using the module MarkupSEO to declare the social media image. When simply sharing the page-url on social media platforms manually, it seems to work fine, so that module doesn't seem to be the problem. However, I added <meta property="og:image:url" content="<?php echo 'http://'.$_SERVER['HTTP_HOST'].$page->poster->url; ?>" /> (as suggested further up) in case that's required for fb because the MarkupSEO-module doesn't provide that tag. Doesn't help though. And then also, I do not quite understand what the following means ?u={url}&title={title}&text={text}&media={media} these are placeholders? what goes in here for real? Lastly, I should mention that on the page itself, the image is not displayed, i.e. not included in the <body>, because it would be redundant with an embedded iframe on the page, so we left it out. Don't know if that's the issue. Thanks for help!
  2. nice module. Could you also make it possible to just copy the current url? What I mean is add another button that when clicked copies the current url to the clipboard. I'm trying to accomplish that with the current options of the module but no luck. Maybe if I could hook the function before rendering there would be a chance…
  3. webhost told me NTLM is not supported by our mail server, server runs Linux (Debian). What to do?
  4. it is, namely OpenSSL/1.0.2u
  5. This module doesn't send mails anymore, though it used to before. The module cannot connect to the email server: [0] string(87) "could not start TLS connection encryption protocol: STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT" and also: C STARTTLS S 220 2.0.0 Ready to start TLS Starting TLS cryptographic protocol could not start TLS connection encryption protocol: STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT I spent hours searching the error. Now I realised that our host uses php version 8.0.14. Might this issue be related to the php version?
  6. I need some sort of module like, or why not the exact module that is used in this very forum to add tags to a page. You start typing, it suggests tags, you select a tag from the list OR you type a tag, hit tab and the new tag is entered (is it added to the list of suggested tags too?). I have used TextInputAwesomplete before for other projects, just tried to use it again but it's quite stubborn and not exactly what I had in mind. Thanks for help!
  7. I tried $item->delete(); but it didn't work. Never mind, I just use the Admin Actions module instead. Thanks anyway.
  8. on a side-note, I find the PW API quite inconsistent, anything I try to solve with the API to avoid doing changes by hand involves a lot of research and forum thread writing and reading and trial and error, because every field seems to work a bit differently, and so it's really time consuming and defeats the purpose of avoiding to do it manually.
  9. what's wrong with my code, why doesn't this work?! $hidden = $pages->find("template=cast, status=hidden"); deleteHidden($hidden, $pages); function deleteHidden($hidden, $pages) { foreach ($hidden as $item) { $pages->delete($item); } }
  10. OK I'm a step further. I thought the following would work but it does not: $suckers = $pages->find("template=cast, include=all, sort=id"); $language = user()->language->title; $language = strval($language); foreach ($suckers as $s) { if ($s->body != '') { $s->of(false); $s->cast_language = $s->cast_language->title.'|'.$language; $s->save('cast_language'); $s->cast_language->save(); $s->of(true); } else { continue; } } Don't know where the issue is, it seems to not really save it properly. I never know which one to use: $s->save(); $s->save($field); $s->$field->save(); Thanks for help.
  11. cast_language is the select options field's name. It has options (multiple checkboxes) as follows: 1=English 2=Deutsch That matches the title of the available languages. I edited my original post and added the foreach loop to make things clearer.
  12. what I want to accomplish is to actually allow the pages to be english AND/OR german, so they can in fact be english AND german. I want to give the content manager full control over which page is shown in which language. So the problem remains that when I run my code, the value of the selectoptions field gets overwritten and I just don't know how to simply add to the array instead. I'm sure it must be possible somehow.
  13. I have an array of bilingual pages. These pages have a body. If the body is filled, it's in the array. So the array is different in english than in german. Criteria is the body. I want to change that though and use a SelectOptions field as criteria instead. That field would be a multiple value checkbox SelectOptions field with values as follows. 1=English 2=Deutsch Now I want to check one or two of these options for each page via API. Something like: foreach ($suckers as $s) { // :D if (user()->language->title == 'Deutsch') { $s->of(false); if ($s->cast_language == "") { $s->cast_language = "2"; } elseif ($s->cast_language == "1") { $s->cast_language = "1|2"; } $s->cast_language->items->add(1); $s->save(); $s->of(true); } if (user()->language->title == 'English') { $s->of(false); if ($s->cast_language == "") { $s->cast_language = "1"; } elseif ($s->cast_language == "2") { $s->cast_language = "1|2"; } $s->cast_language->items->add(1); $s->save(); $s->of(true); } } But I think that's nonsense, still cannot tell from the documentation how to approach this. The issue is, the array depends on the user's current language, so in order to use this function to set the values right I need to run it once in German and once in English. But at the second run it will overwrite the values of the first run. Don't know how to add to the array of selected options. Thanks for help!
  14. I have some html in a body field of a page including some <a> tag. For some reason the last bit of the link appears in the head in some meta tag and it breaks the page, the text appears on top of everything else. It must have to do with a faulty parsing of the html, meaning the closing of the <a> tag break the entire html but I have no idea how to fix it. The body is a CKEditor field. So it's like: <p>whatever whatever, <a href="https://www.domain.com/whatever" rel="noreferrer noopener" target="_blank">blablabla</a>.</p> and then I see on top of the page above all other content: blablabla. " /> Any ideas?
  15. Thanks, I already put the memory_limit to 320MB which didn't help. It works on my test-installation though, which however has a smaller database. So I guess if setting the RAM to 512MB works, that solution would only be temporarily as well. Any more ideas?
  16. I have troubles using AdminActions. I get… Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) (Zeile 1325 in wire/core/WireDatabaseBackup.php) However, if I disable automatic backup, it works fine. So now I wonder how to fix this properly, without disabling the automatic backup. Which memory is exhausted exactly? Hardly is it the server, we have unlimited storage. Thanks for help
  17. On the testing environment – subdomain, same server – I actually left the ChangeLog module active and the CSV-upload still works like a charm. I talked to the host, they don't see any difference in the server settings on both. They put the max memory for the live server. Still doesn't work. I compared the active modules on both installations, there is virtually no difference, in fact more modules are active on the testing environment which works fine. I deleted the cache in the assets folder, which is pointless, I reckon. Any help is appreciated.
  18. I uninstalled ProcessChangelog, but that didn't help. My client is still experiencing the same issue when uploading. Any more ideas what this error could mean?
  19. This might be a very basic question, don't know what's the easiest solution though… Let's say I have some pagetree like that: beverages > whiskey > > Jameson > > Ardberg > beer > > Heineken > > Leffe sweets > cake > > cheesecake > > chocolate > ice cream > > stracciatella > > raspberry I want an array of all these pages in order of appearance in the page tree. I tried: $homepage = $pages->get('/'); $items = $homepage->descendants("template=menu"); But when I loop through it foreach ($items as $item) { echo $item->title; } it first shows level 1, then level 2, then level 3 like this: beverages, sweets, whiskey, beer, cake, ice cream, Jameson, Ardberg, Heineken, Leffe, cheesecake, chocolate, straciatelly, raspberry Thanks for help!
  20. I'm having a similar issue as @ceberlin when uploading a CSV file to import pages Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) (Zeile 1325 in wire/core/WireDatabaseBackup.php) (I started there: https://processwire.com/talk/topic/26256-allowed-memory-size-of-268435456-bytes-exhausted-tried-to-allocate-4096-bytes-zeile-1325-in-wirecorewiredatabasebackupphp/ which brought me here.) Is there any way to fix this issue other than deactivating/uninstalling the module?
  21. how do I do that? I do indeed use that very module ProcessChangelog. Might that be the problem? That module is actually not installed in said test environment, so it looks like that could be it. I'd love to better understand this… Not sure if the database is huge but it will be much bigger soon once we migrated everything.
  22. Hi people, my client reports an issue when trying to import a CSV-file via a custom action I wrote on top of the ProcessAdminActions module. This is the error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) (Zeile 1325 in wire/core/WireDatabaseBackup.php) I had put a copy of the whole website on a subdomain on the same productive server for testing purposes. Now I tried to upload the same CSV-file there with no issues. We encountered this issue before I think I already reached out here, just cannot find the thread anymore. A working solution I think was to update the post_max_size etc. within the php.ini file, but that seems suboptimal, my client, who is quite tech savvy, thinks there must be a bottleneck somewhere. Any ideas? Thanks for help!
  23. I think I made a tiny progress, but still far from satisfying… I get… Notice: Undefined index: mc_gross in /home/.sites/66/site2760076/web/dev/site/assets/cache/FileCompiler/site/modules/PaymentPaypal/PaymentPaypal.module on line 87 I use the exact code as described in the github README example and set the get-variable ?step=process manually just to test. I'm not sure the above is even a big issue, but it's not working anyway, or hard to tell exactly. No sign of payment in my sandbox account anyway. A couple of questions… I set my paypal account to send IPN upon payment, does that even work here? I ask because it says: 'summary' => 'PaymentPaypal - using standard payment API and PDT for verification', so I wonder if those are the exclusive alternatives to IPN. And then, why do I send an address to paypal? To my understanding, a user would pay with their paypal account in which they stored their address beforehand anyway, so why send it? Can paypal separate a shipping and a billing address? Because if not, then one could make an argument as to why that makes sense after all. Next looking at the code from the github example and the module code itself, it's hard to tell where I am in the transaction with all that back and forth to and from paypal. Is data[mc_gross] missing in the array/object sent to paypal or coming from paypal? I guess it's the former. Still, would be great to have some more documentation because it's hard enough to work with paypal as it is. Thanks for help!
  24. a bit late to the party here… hello everyone. I'm currently building or I just built a custom checkout flow from scratch, mostly frontend with automatic order and confirmation email. I also integrated a paypal button following the tutorials from paypal.com. This kinda works but it's also the only thing that doesn't quite yet work. I still need to figure out how to get the shipping and billing address from paypal so I can include it in the order and confirmation email, because in the checkout flow the address form is presented only for payment methods other than paypal (the reason being that paypal already stores these details in the user's account). So apparently I need to use the IPN functionality from paypal and parse that notification, also send it back unparsed, wait for a validation, check the ID and whatnot, all that good stuff. I'm not sure what this module here actually help with. Can it do the IPN handling? I went through the source code on github but it's still not clear to me. Any more suggestions or should I keep writing from scratch at this point? – also learned about padloper just now ?? so maybe next time I give this one a shot.
×
×
  • Create New...