Jump to content

Spiria

Members
  • Posts

    111
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Spiria

  1. I will try disabling modules, which is a PITA ? Thanks for the suggestions. I will let you know.
  2. I have indeed logged out and back. In fact, the problem is also on the production site which runs a lesser version of PW. I reinstalled also TracyDebugger and clean all the caches, but to no avail.
  3. I have a weird problem with Tracy Debugger. I don't know if it's related to the module, but I can't change the settings. I always get an "ProcessWire: Unrecognized path" error with a curious URL (/bookmarks). I don't have this problem with my other sites. They are all running under 3.0.171 at the moment, at least locally. Any idea?
  4. Hello, I tried to install the SVG File Sanitizer/Validator module as recommended by ProcessWire (thus by @ryan ? ). However, as soon as I enter "svg" in the list of allowed extensions, I get a nice red screen. I have to allow svg to bypass the validation. What is the problem?
  5. I am writing here instead of the ProCache forum because I have the impression that several nginx experts could solve this. In its new version, Procache proposes new .htaccess rules that are difficult to translate into nginx rules. We currently have a problem with the trailing slash of URLs which gives us a bad score in SEO analysis tools such as semrush.com. Indeed, a canonical URL is either without or with "/", but cannot be served by both options. Although ProcessWire without ProCache respects this rule, ProCache has no difficulty serving both, which is considered an SEO optimisation fault. I believe that ProCache version 2 solves this problem with these new rules, but I can't understand the following. Does anyone have any idea how to translate this into a nginx rule? Attached also the whole proposed .htaccess for ProcessWire. # PROCACHE v2/31885be14d6cfb4b2b0d3e533260bded -------------------------------------------------- RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteRule ^.*/$ - [E=pwpcstep:pour,E=pwpcname:index] RewriteCond %{ENV:pwpcstep} "=pour" RewriteCond %{HTTP_COOKIE} !^.*(wire_challenge|wires_challenge).*$ RewriteRule ^.*/$ - [E=pwpcstep:stir,E=pwpcpath:%{DOCUMENT_ROOT}/site/assets/ProCache-00478359c5e65dbada1075bfbd4] RewriteCond %{ENV:pwpcstep} "=stir" RewriteCond %{ENV:pwpcpath}/$0/%{ENV:pwpcname}.html -f RewriteRule ^.*$ - [E=pwpcstep:drink,E=pwpcfile:$0/%{ENV:pwpcname}.html] RewriteCond %{ENV:pwpcstep} "=drink" RewriteRule ^(.*) %{ENV:pwpcpath}/%{ENV:pwpcfile} [L] <ifModule mod_headers.c> Header set X-PWPC "ProCache" env=pwpcstep Header set X-Powered-By "ProcessWire CMS, ProCache" env=pwpcstep </ifModule> RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$" # /PROCACHE ------------------------------------------------------------------------------------- .htaccess-procache
  6. We have been asked for a project which will require that any DB transaction be made securely. My IT team has set a mySQL server in SSL for our tests. How is it set in ProcessWire? Are the config()->dbOptions enough to assure so? Has someone some advice, or code on that?
  7. My bad... everything is fine. A table name was not correctly written ...?
  8. I was trying the $database variable just for the purpose of figure it out. I have a custom table placed in a PW database and try to populate it with some data. I use this code. I don't want to use fields and page creation for this feature: public function saveMessage(array $data): int { $database = wire('database'); $statement = "INSERT INTO pm (pageId, title, ownerId, correspondentId,message,thetime,ownerRead,correspondentRead)" . " VALUES (:pageId, :title, :ownerId, :correspondentId,:message,:thetime,:ownerRead,:correspondentRead)"; $query = $database->prepare($statement); $query->bindValue(':pageId', $data[0], \PDO::PARAM_INT); $query->bindValue(':title', $data[1], \PDO::PARAM_STR); $query->bindValue(':ownerId', $data[2], \PDO::PARAM_INT); $query->bindValue(':correspondentId', $data[3], \PDO::PARAM_INT); $query->bindValue(':message', $data[4], \PDO::PARAM_INT); $query->bindValue(':thetime', $data[5], \PDO::PARAM_INT); $query->bindValue(':ownerRead', $data[6], \PDO::PARAM_BOOL); $query->bindValue(':correspondentRead', $data[5], \PDO::PARAM_BOOL); try { $query->execute(); $result = $query->rowCount(); $query->closeCursor(); } catch (\Exception $e) { $result = 0; } return $result; } If I dump the $query statement after binding the values, I get this, which shows that the values are not bound. object(PDOStatement)#279 (1) { ["queryString"]=> string(201) "INSERT INTO pm (pageId, title, ownerId, correspondentId,message,thetime,ownerRead,correspondentRead) VALUES (:pageId, :title, :ownerId, :correspondentId,:message,:thetime,:ownerRead,:correspondentRead)" } I use the 3.0.153 dev branch and my function is placed in a page Class (wonderful feature!) Of course, nothing is saved in the database. What am I missing?
  9. I have switched to 3.0.152 and get this error when trying to edit any templates using a FieldTypeCache: ProcessWire: ProcessPageEdit: Method FieldtypeCache::getFieldsTemplate does not exist or is not callable in this context which returns not content at all. I have cleared all my caches, refreshed the modules, but to no avail. Switching back to the previous version (3.0.139) corrects the problem.
  10. Hello Ryan,

    Please find the French translation of FormBuilder. I don't know if such a translation exists somewhere. Didn't find it.

    site--modules--formbuilder--processformbuilderembed-php.json site--modules--formbuilder--processformbuilder-module.json

  11. We had the opportunity and pleasure to create a multi-site with ProcessWire. The Walter Group consists of four investment units, each with its own domain name(s). Thus, six domain names with two different language negotiation strategies had to be managed by a single installation. The four sites more or less share news, staff and other information. waltergroup.ca (in English) and groupewalter.ca (in French) walterfinancial.ca (in English) and financierewalter.ca (in French) waltercapital.ca/en and /fr walter-gam.com/en and /fr The Multisite module was designed to meet the challenge. A tree structure has been created with the four units, with news and management staff pages placed outside these sites so that they can be more easily managed by Walter Group. We also used FormBuilder for the four contact forms whose entries had to be directed to different people. The result really pleased the Walter group, long used to complicated CMS!
  12. Yeah, I just don't want to code something that will have to be changed each time this module is enhanced... ?
  13. My programmers prefer to seperate views and controllers, so they configured this in config.php $config->paths->templates = $sitePath . "templates/controllers/"; //$config->paths->views = $sitePath . "templates/views"; The SEO module was working perfectly well with this until the new version. I will ask in the Latter forum.
  14. As said, this does not work for me.
  15. Hi @Wanze Since your breadcrumb addition (0.8), your module is no more compatible with Template Latte Replace module. While I can, in theory prevent the structured_data_breadcrumb template file in the Latte module, this doesn't function. Any idea how to circumvent the problem?
  16. We have a local config.env.php file which is read by our general config.php. Everything that is commun is in config.php, but local settings are kept in config.env.php. In config.php: /** * Environment configuration file * */ $configFile = $config->paths->site . 'config.env.php'; @require_once($configFile);
  17. Please note that on line 695 of MarkupRecurme.module, the string 'All day' has not been available for translation: // if allDay if($event->allDay) { $event->time = 'All Day'; }
  18. I have a sudden and strange bug. While my local installation is doing fine, I can no more have access to my pages on production site. It looks like that the JqueryCore is not working. I uploaded a new wire directory, just in case, but to no avail. My site is identical on production and local. Have you ever experienced this? I just get this dialog: Unknown error, please try again.
  19. Hi, I must create a synchronisation process to import data from a CRM. I have a page reference field where I don't know in advance all the available options. It has to be added in the reference tree. In my import script, based on Ryan's Import Page by CSV module, i coded this: $p->crm_member_type = $data['TypeDeMembre']; where $p is a valid page to be saved. $data['TypeDeMembre'] is a string. Actually, if the entry is already present in the page reference tree, the data is saved correctly. But if the entry does not exist, nothing is saved. This page reference field ("crm_member_type") is set to accept new entry on the UI, but I think this feature is not available from API. Do I have to check first if the entry exists then create a the right page to be referenced afterwards?
×
×
  • Create New...