Jump to content

psy

Members
  • Posts

    624
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by psy

  1. Wasn't sure where to post this so chose this forum as not sure whether it's unique to my scenario, a bug, something I've done wrong or a suggestion for a PW change. Scenario is: - TLD has a website built with another CMS with it's own .htaccess - ProcessWire section is in a sub directory - 99% of everything works fine except for Lost Password module - using FrontEnd user module and had similar problems with the Login form but managed to resolve by changing the form action to the current page url in the page template What happens: - using FE User module, when I click the Lost Password button and enter a valid username, the form returns FALSE and just re-displays the Lost Password form - using FE User module, when I enter an invalid username (eg user email), the page displays the message that an email will be sent - no email is ever received as the username does not exist in Users - took a step back and just used the Lost Password in the normal PW admin - entered valid username and message was displayed but no email ever received - sometimes (didn't catch the exact scenario), the page redirected to the TLD/other CMS home page What I've noticed is that in the code for LostPassword module (and others), instead of the form action returning to the current page it's hard coded as ('./?forgot') or in other FieldtypeForm modules just ('./') That's OK if PW is installed in the root dir and the home page has the code necessary to handle the responses. Changing $config->urls->root or PW .htaccess doesn't have any effect (maybe because root .htaccess governs other CMS?) Anyhoo, my question is: Would it not be better instead of hardcoding the form action as './' to use $config->urls->root , $pages->get(1)->url or even $page->url? Using: PW 3.0+
  2. I'm developing a module to integrate BigCommerce's Stores API (https://developer.bigcommerce.com/api) with PW. After a steep learning curve, I managed to use composer.json to download the latest version of the API into a 'vendor' directory. { "name": "processwire/processwire", "type": "library", "description": "ProcessWire CMS/CMF", "keywords": [ "cms","cmf", "content management system" ], "homepage": "https://processwire.com", "authors": [ { "name": "Ryan Cramer", "email": "ryan@processwire.com", "homepage": "https://processwire.com", "role": "Developer" } ], "require": { "php": ">=5.3.8", "ext-gd": "*", "bigcommerce/api": "*" }, "autoload": { "files": [ "wire/core/ProcessWire.php" ] }, "minimum-stability": "dev" } Using composer.json and its autoload.php feature works great. All I need in my template is: <?php use Bigcommerce\Api\Client as Bigcommerce; Bigcommerce::configure(array( 'store_url' => 'https://www.mybigcommerceshop.com', 'username' => 'admin@mybigcommerceshop.com', 'api_key' => '8fab84ce1776dbba18665xxxxxxxxxxxxf' )); $ping = Bigcommerce::getTime(); if ($ping) echo $ping->format('H:i:s'); My dilemma is that the files are in './vendor', not './site/modules'. Not everyone will use composer.json so looking for recommendations on how to best code the module to first look in './vendor', then if nothing there, look into './site/modules/BigCommerceApi/Api' to load the files (which may be out of date) and instantiate the API. Suggestions? Using: PW v3.0.24
  3. Links added and closing tags removed. I updated the version # to 0.0.3 but it is still showing 0.0.2 in the modules directory? Thank you all for your help. Much appreciated.
  4. OK. Still learning. Thanks. Submitted module via github and had to open a forum topic as part of that process. Hopefully sorted now. Let me know if I need to do more to make the module available.
  5. Hi dragan Could be a combination of a few things. It's my first module and I think I followed all the instructions to submit it to PW modules and the new forum. Github link is https://github.com/clipmagic/MarkupJsonLDSchema/zipball/master
  6. This module helps you dynamically create schemas for improved SEO & SERP listings from within your templates. Each schema can be configured to meet your requirements. You can even add your own ProcessWire schema classes to the module. Read about the module on github: https://github.com/clipmagic/MarkupJsonLDSchema Download from github: https://github.com/clipmagic/MarkupJsonLDSchema/zipball/master Download from ProcessWire modules: http://modules.processwire.com/modules/markup-json-ldschema/
  7. Just upgraded a site to 3.0.18 and having the same issue, ie image description not showing as image tag alt attribute even though 'body' ckeditor field settings as per tpr's post above.
  8. After trawling/trying everything this forum and everything I could search for on the topic, I couldn't find a solution to my problem. Scenario: I have a Fieldtype Options field as radio buttons. It's a required field 'display_price' with a default value of, 'Price'. The other choice is 'Text'. To preset a radio field with a default value it must be 'required'. I have fields that show/hide dependent on the value of 'display_price'. If I don't set 'display_price' as a required field, the page edit screen throws a warning that the default cannot be set. When 'required' is set, on the admin page edit, the show/hide works perfectly. However, regardless of the choice of the radio field, the dependent field's value is never saved. Removing the 'required' status of the 'display_price' field results in the associated subfield being saved. HOWEVER, from the client's POV, it's necessary that the 'display_price' be a required field. Help! TIA
  9. After creating fields and assigning to a template, I added pages with the template. All good. At one point, I had an admin edit page open to view the data and the template configuration in another browser tab to check the field names as I was coding the layout offline. I edited the page and submitted. I then viewed the front end page in another browser tab which showed nothing? Went back to the template config tab and refreshed it. All 35 x fields, including the title field were dropped from the template!!! I checked in phpMyAdmin and my custom fields were all there with, eg land_measurement: {"inputfieldClass":"InputfieldSelect","tags":"property","collapsed":0,"send_templates":[41],"showIf":"land_area!=''","columnWidth":80} where [41] matched my template id. Everything else in the template configuration was correct. What happened to the field assignments in the template? How can I recover them without having to reconstruct the template? More importantly, what caused this behaviour so I can avoid it in the future? Using: PW 2.6.1 Apache version 2.2.29 PHP version 5.4.40 MySQL version 5.5.42-37.1-log PS: I also had a template lose its fields on another site running an earlier PW version on a different host. Any ideas? TIA
  10. Woohoo! Got it. Thank you Soma. So much to learn! Solution: do as you say above and make the field Single page (Page) or empty page (NullPage) when none selected, then in the template: <p class="type"><?=$child->fields->property_category->label?>: <?=$child->property_category->title?></p> Still had to put $child->fields->property_category->label but all part of the learning process. Cheers
  11. Hi soma Not sure what you mean. This is my first PW site. I'm converting an existing site from another CMS. 'property_category' is a dropdown (single select). The $child page also contains other fields that are checkbox groups using the 'page' field type but haven't got to those yet. Does this make my question clearer?
  12. Thank you for the above. Unfortunately I cannot get it to work in my scenario where I have a foreach loop: <?php $children = $page->children; ?> <div class="listings"> <?php foreach ($children as $child) { ?> <div> <p><?=$child->headline?></p> <p><?=$child->property_display_price?></p> <p><?=$child->fields->property_category->label?>: <?=$child->property_category->title?></p> </div> <?php }?> </div> The only way I could get the 'property_category' label to display on the front end was as above specifying the 'fields' object and the property_category title is blank. The property_category title value gets called from another page from a 'page' dropdown. Like sarah_hue, I've tried lots of variations and the only way I can get the remote page title to display on the front end is to hard code the remote page id: <?=$pages->get('1088')->title?> Where 1088 is the selected value of the dropdown. All help most welcome.
×
×
  • Create New...