Jump to content

suntrop

Members
  • Posts

    316
  • Joined

1 Follower

Profile Information

  • Gender
    Not Telling
  • Location
    Germany, Cologne

Recent Profile Visitors

4,887 profile views

suntrop's Achievements

Sr. Member

Sr. Member (5/6)

50

Reputation

1

Community Answers

  1. Thanks guys! @bernhard That is quite nice, to add the second field by JS. I was thinking of adding it via PW's hook system and do the conversion in PHP. But I like your idea. Had to change some parts, because sometimes the field is inside a repeater field and the names are price_repeater1234. Perhaps it is just me, but I would have thought conditional hooks take this into account. I had to remove the Inputfield(name=price) and check from within the hook. BTW, there is a new str_starts_with() function in PHP 8 ? @MarkE Looks interesting! Like the idea a lot. This time I'll stick with the simpler help of JS.
  2. Hello everybody ? I am in need of some form of advice or ideas. I've got a site that displays products along with prices. Prices stored in net, but showed on the frontend and newsletter as its gross value. We decided to use net because there are three different gross values (different countries, calculated via external API) and it makes programming easier. So, now, my client wishes to input the gross value into the CMS. That would cause a lot of changes, (it is error-prone) and makes some things more difficult at our end of the product. Despite I'd like to give my clients what they need, I was thinking to use hooks for that. So whenever something is put into the field "price" will get converted before storing in the DB and vice versa gets converted to be shown as gross in the field value. That way, I "just" have to change it at a single point: the hook for the CMS field. What you think? Is this kind of more a hacky way and brings in the long run more problems than short benefits? I am always used to work with what I actually have and see :-)
  3. Hi all the password reset isn't working correctly. When I enter the username, I receive the reset email/link https://www.example.com/memberarea/login/?forgot=1&u=1222&t=nKIvd6Rpin4El.3Jc19aTPsDWAaZhw%2F9 But when I click the link I get redirected to the actual login page. The URL is https://www.example.com/memberarea/login/ again, there is no notification/error message and nothing to put in the verification code or reset the password. I just checked there is no redirect on behalf of my site/code. Found another forum thread and github issue with the same effect, but without any solution. PHP 7.4 PW 3.0.165 Login/Register 0.0.2 ProcessForgotPassword 1.0.3 Using it on frontend login, not admin login page
  4. Yeah, I did this. That's why I know there are 30 addresses that are not unique ?
  5. I have updated to PW 3.0.184 last weekend. Noticed this week, Mail-Login is not working any more. I guess there must be changes made in core or the Login module (had something ~3.0.164 before). The Login module says now, "To use email login, you must enable the “unique” setting for your email field." When I enable the checkbox "Unique" and save the "email" field, the checkbox is cleared again. There is no error message. But it is probably because there are already 30 email addresses more than once used. Problem now: It would be quite hard to check which accounts are the latest/active ones and which could be renamed or whatever. Anybody with an idea? Anyone knows when things changed in the Login module?
  6. Yes, I had set the namespace properly. Strange part now, I installed another PW instance, a couple of hours ago, and first thing I tested was the Functions API in a newly created _main.php. It worked. I did a lot of testing and lastly just copied the file itself. That file worked (was just an echo page()->id). I copied the markup again and everything was like before, but it now works. I have no idea what was wrong with the other file. Just tested with different encodings, BOM, w/out namespace etc. but nothing to reproduce the error.
  7. It is quite some time since I launched my last PW project and can't remember/find if I forgot something. The functions API in my /site/config.php is set to true. I have just installed a blank new PW project. But every call ends with an error. <?= var_dump($config->useFunctionsAPI); page()->get('title'); ?> bool(true) Darn… Fatal Error: Uncaught Error: Call to undefined function page() in site/templates/_main.php:15 The config setting is correct, but still it is not working. Did I miss something? I just installed 3.0.165 Edit: Just noticed it works fine in template files like basic-page.php and home.php but not in _main.php (which gets appended)
  8. Yes, can confirm and I had disabled 16A Just upgraded to current dev version. It got kind of worse. When I save a page with the pagename "teßtpage" the field is empty after admin page reloads. DB has a wrong punycode of "xn-stseite". However, saving "testsäite" will save but still results in a 404.
  9. BTW: it doesn't work with page URL either. I can create/save a page with name like teßtpage but get a 404 here as well. So it doesn't seem to be URL segments problem only I am using pW 3.0.165
  10. Yes, but nothing changed. Once there is any non ascii character I get a 404.
  11. I can't remember I have used this before. Especially for URL segments. But the website uses a lot of image tags. Unfortunately tags are saved as simple strings not with slugs alongside.
  12. Yes, I am speaking of Umlauts like äöü and ß. I did enable UTF8 page names and the whitelist contains all chars I need. However, it still shows a 404 for pages containing special chars.
  13. I am using images tags as links and some tags contain special characters (like schwarzweiß). Links are pointing to a URL segment. Problem is, URL with special chars are not working. I added $config->pageNameCharset = 'UTF8'; in my config file but still I see a 404 on URL with special chars. Any idea?
  14. Ok, but that is not what I am looking for. I'd like to keep it in one field. But I guess I'll revert everything to where I had just two textarea fields. That wasn't good to validate, but it worked.
  15. Thanks, but I don't get what you are trying to say. I need to have two separate addresses, because shipping is mostly other than billing address. But I still can't see how PW works exactly saving data. First PW calls sanitizeValue() and next calls sleepValue(). But when I check $value in sleepValue() $sleepValue = [ 'data_billing_company' => isset($value->billing_company) ? $value->billing_company : $page->billing_company, //… 'data_shipping_gender' => isset($value->shipping_gender) ? $value->shipping_gender : $page->shipping_gender, ]; it doesn't work either. Seems to be all $value->xxx are always set, even when not set when saving data from API.
×
×
  • Create New...