Jump to content

Christophe

Members
  • Posts

    701
  • Joined

  • Last visited

Everything posted by Christophe

  1. As I've just put back my user account's backend to French, I'm wondering if the fact that I put it at one point in English is a little bit related (but it shouldn't). But I don't remember when exactly I did it. I'll take a look at the results with site:processwire.com/talk/ "Call to undefined function _x()" in Google.
  2. Hello, It seems fine again. Like before my attempt at upgrading to version 3 (because I could need the LOGIN/REGISTER/PROFILE module in the near future). Perhaps it was related to the PHP environment, to a Let's Encrypt certificate automatic regeneration... and I had to wait a little for some cache cleaning on the server side. And it seems also that they had some network issues at the same time...
  3. I have to go to bed, I haven't slept at all. I've reverted back to more or less day-1files fetching them via a snap-0 (just after midnight) sftp connection, but perhaps it's not far enough. I've tried to revert back to a day-1 database, but I had an error message from within the hosting's Manager (and I couldn't connect to it from PHPMyAdmin). I have this on the login page: Error: Call to a member function setLanguageValue() on array (line 43 of /home/.../www/wire/modules/LanguageSupport/FieldtypeTextLanguage.module) when Debug mode is true, (when Debug mode is false: The server encountered an internal error or misconfiguration and was unable to complete your request.) and this also: Server Error We're sorry! The server encountered an internal error and was unable to complete your request. Please try again later. error 500 | 10. 3. 2018 09:10 and the Server Error message appears alone on the homepage, for example. I've written to the hosting company to know if they had/have problems. Perhaps I'll have to revert a few days back (not really a big problem). Edit: if the database and the files aren't of the same day exactly could it be a problem? Should I remove the Tracy Debugger module manually via sftp?
  4. I've reverted back to PHP 5.6, in case. I've put everything back as it was before, and I've removed the namespace lines where I had added them. I've cleaned the site/assets/cache/ folder again. Now I can't login, everywhere (frontend and backend) I see: Notice Array to string conversion File: .../LanguageSupport/FieldtypeTextLanguage.module:83 73: /** 74: * Format value for output, basically typecasting to a string and sending to textformatters from FieldtypeText 75: * 76: * @param Page $page 77: * @param Field $field 78: * @param LanguagesValueInterface|string $value 79: * @return string 80: * 81: */ 82: public function formatValue(Page $page, Field $field, $value) { 83: return parent::formatValue($page, $field, (string) $value); 84: } 85: 86: /** 87: * Given a value, return an portable version of it as array I'm going to try to revert back (files and database) directly with the help of the hoster's tools. I should have gone to bed.
  5. Good idea :). After seeing the problem, I upgraded from PHP 5.6 to PHP 7.2. Same thing. I'm keeping it at 7.2 for the moment. I'm reverting back to 2.8.62. It should be easy, I still have the renamed old folder and files. I'll wait and try again.
  6. [Update] I also have an error message when accessing any module page in the backend: Warning count(): Parameter must be an array or an object that implements Countable File: .../Inputfield/InputfieldFile/InputfieldFile.module:513 503: return $out; 504: } 505: 506: public function renderReady(Inputfield $parent = null, $renderValueMode = false) { 507: $this->addClass('InputfieldNoFocus', 'wrapClass'); 508: return parent::renderReady($parent, $renderValueMode); 509: } 510: 511: public function ___render() { 512: if(!$this->extensions) $this->error($this->_('No file extensions are defined for this field.')); 513: $numItems = count($this->value); 514: if($this->allowCollapsedItems()) $this->addClass('InputfieldItemListCollapse', 'wrapClass'); 515: if($numItems == 0) { 516: $this->addClass('InputfieldFileEmpty', 'wrapClass'); 517: } else if($numItems == 1) {
  7. Hello, I've just upgraded a website from 2.8.62 to 3.0.62. In the backend everything seems fine. But, when connected, I now see this message on the frontend (Debug mode On + Tracy Debugger): Error Call to undefined function _x(), did you mean _()? File: /home/.../www/site/templates/_head.php:2 1: <!DOCTYPE html> 2: <html lang="<?php echo _x('fr', 'HTML language code'); ?>"> And an Error 500 message when not connected to the backend. Precision: only the French language is currently activated. Any idea(s)? (What other information do you need?)
  8. Hello, Perhaps it's better to ask at
  9. https://telegram.org/blog/login
  10. Hi, No swear/bad words please (even with *s)! These Forums are currently quite free from them. Thanks in advance. Have a nice day!
  11. Hi, I see that you asked a similar question in 2016: Have you seen this topic (and the pages that it links to), for example?:
  12. Hi, Please try with this, for example, in Google: site:processwire.com/talk/ Error: Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry for key 'PRIMARY' (in wire/core/FieldtypeMulti.php I've removed some parts to get more links.
  13. Hi, <a href='index.htm#' data-filter='<?= $item->title ?>'> Why single quotes here? <div class="portfolio-item <?= $item->title ?> "> Space not needed before the closing double quote? <img src="<?=$single->images->first->url ?>" alt="<?= $single->images->description->first ?>"> Order of the "description" code? (Sometimes you may need the use of curly braces in order to make the code work when there are quite a few "->".) Do you have code highlighting (for html, css, php...) available/activated in your code editor? It helps. Often, a little detail can make it not work.
  14. tus and the Uppy File Uploader (an official implementation by the same people) seem really interesting. As well as resumablejs and transfer.sh (mentioned in a linked topic).
  15. Or Stripe Checkout: https://stripe.com/checkout https://stripe.com/docs/checkout (Integrating Checkout, etc.) https://stripe.com/docs/checkout/php Edit: http://modules.processwire.com/modules/payment-stripe/
  16. Hello, Nice! If I have the choice I prefer to use a program like FileZilla for (S)FTP. I still have to try FreeFileSync (that I'm using for computer backups) for (S)FTP synchronization, but it seems easier to set up (and use) for Windows or Mac OS X than for Linux. You could perhaps at least lower your folders' permissions to 755 (instead of 775, like it's the case for assets/ and templates/). Perhaps quickly check your (sub-)folders' and ("sub-")files' permissions (even outside site/). Have a nice weekend!
  17. Hi, 755 for folders and 644 for files (with FileZilla, for example, you can easily do it - recursively). But you can/could lower the permissions for some files like site/config.php, .htaccess, index.php, ready.php, etc., depending on your hosting environment, as long as it works. See also https://processwire.com/docs/security/file-permissions/ Perhaps you should empty your site/assets/cache/ folder. You can also look at the results in Google for the following request: site:processwire.com/talk 'failed to open stream: Permission denied' warning Edit: verify the site/assets/ folder permissions as well as the permissions of all its (sub-)folders and ("sub-")files. (Perhaps, also try refreshing the modules cache.)
  18. Hello, And thank you for the code for site/ready.php. WIth comments,etc. I think I understand its logic, at least enough for the moment. I've started looking at the Hooks pages/docs again. The code doesn't seem to work currently. I can't know why. No error messages. I've modified the id's. Yes, in case the website has another language activated, it's better to use id's :). And for qui_1->id, the id is the id of the page being referenced as a choice, so I changed it well normally. The field is mandatory. I've filled in and sent 2 fake form instances to test ready.php. When I click on publish for these pages nothing seems to happen. The page stays under the temporary parent, with the temporary template. I see "Session: Page saved: /.../ (1 change/modification). And also, I see "Session: Modification : status" and "Session: page still unpublished" but only after publishing then unpublishing the page(s). I have debug mode (still) on. Perhaps $page->save(); should be used twice? As the new template is only available when the new parent is "saved". But perhaps it's different with the api(?). It could be anything that makes it not working of course :/. (If it's needed, I can provide more information, etc.) Have a nice day/week! NB: perhaps the order of some things/"commands" have to be changed(?). Or perhaps in finished.php (But, "Admittedly, this is probably not the place you would put hooks,..."). Edit: should I install Tracy Debugger?
  19. Hi @FlorianA, Could you post more details related to your piece of code? I have the impression that it's a little (missing) detail that's making it not working.
  20. Hi, Try this in Google: site:processwire.com/talk/ "The process returned no content" errors There are even processwire-related results without the site:processwire.com/talk/ part.
  21. Thanks @kongondo! Edit: Not sure this is what I need...
  22. Hello, How to automatically change a page's parent then its template once/after the page is published (while being a child of a temporary parent)? The new template is only available for a child of the new parent (and the old template is also available). Does someone know how to do this? It's the first thing I have to find a solution for. To translate the following to a hook in ready.php, or in another more adequate file? If a page using the directory_page_temporary template (or perhaps it's better to say if a page whose parent has the name annuaire-repertoire-temporaire-avant-validation, or is using the directory_listing_temporary template) is set to published: if the page's qui_1 (radio button) field is set to mannequin-modele (page reference), then: change its parent to/move it under the parent whose name is mannequins-modeles (or who is using the template directory_listing_mm), change its template to directory_page_mm. if the page's qui_1 (radio button) field is set to autre-artiste (page reference), then: move it under the parent whose name is autres-artistes (or who is using the template directory_listing_autres_artistes), change its template to directory_page_autre_artiste. qui_1 is of type Page Reference. In the Field tab, in Selectable pages, Parent is set to Choix Mannequin/Modèle ou Autre Artiste (Choix translating to Choice). This Choix Mannequin/Modèle ou Autre Artiste page's path is /fr/outils/choix-mannequin-modele-ou-autre-artiste/ (the website is multilingual-ready, but only French is currently activated/used). And Choix Mannequin/Modèle ou Autre Artiste's children are, as you have probably guessed, Mannequin/Modèle (mannequin-modele being the name) and Autre Artiste (autre-artiste being the name). Outils and its children are Hidden. Edit: the page should be automatically added to the top under its new parent. Thanks in advance for any help! [ Related topic: https://processwire.com/talk/topic/18497-help-needed-to-improve-a-websites-functionalitiesfeatures/ ]
  23. What are you using on localhost and the other server? On (Laravel's (?)) Forge, Nginx is used, not Apache apparently. Edit: so you are (perhaps) using Digital Ocean on Laravel's Forge, which is where it doesn't work? But you mentioned another server where it works, which one is it? There are perhaps some tweaks that are needed.
  24. Hello, Do you at least see the changes in the backend/admin ("message that data is saved")? If you see the modifications in the backend, could it be a cache issue (browser, server, processwire...), and because of that you don't see the changes on the frontend of the website? Can you give more details (hosting...)? What are the technical differences between your local and live environments?
  25. Hello, And thanks for your message. [ Edit: I'll look at this "Login Register" module. But, the website uses ProcessWire 2.8.62 (I've updated it). I'm "afraid" of upgrading it to version 3. I have to check again what to change for the update. But I just have the following modules installed: Form Builder 0.3.0, Social Share Buttons, Database Backups, and Upgrades (the "Upgrades" module not working like before since the last ProcessWire update). ] First, when the data entered in the inscription form [ https://goo.gl/LF57a3 ] is sent via Form Builder, apart from currently sending an email with the information, a processwire page is also created under a (common) temporary parent/"directory" (with its own template), whatever the choice is (Model or Other artist) for the radio button field. I've made the change to the (radio button) field so that it cannot be edited. What I would first need now, before anything else, is, for example, an automated way, as soon as the client validates the page by publishing it, to move it under its non-temporary/real parent page (depending on if the page is set to Model or Other artist) and after to change its template (depending also on the same). There is "Annuaire des books", the real "directory" (the "Grandparent"), and under it, the "Mannequins/Modèles" parent and the "Autres Artistes" parent (each one having its own template available. So, as I said earlier, currently, the parent change then the template change have to be done manually, and changing the template from the temporary one to the new adequate one removes the unnecessary fields after confirmation. And, of course, their children have their own unique template.). So, there are 6 templates: directory_listing_autres_artistes directory_listing_mm directory_listing_temporary directory_page_autre_artiste directory_page_mm directory_page_temporary (By the way, URL Segments are used for the Models or Others artists on the front-end.) I don't know what would be the best option in order to automate these two things and how to do it. With a hook(s) in ready.php or elsewhere, and which one(s)/how? Or with the "Admin Actions" module, and how? I'm going to keep in mind (at least) the following modules, for when I have the first automation solution already working and I can continue: Email New User Password Generator Force Password Change Restrict Tab View PageEditPerUser (and/or https://processwire.com/talk/topic/214-lock-user-to-be-able-to-view-and-edit-one-page-only/) Some of these modules seem to solve part of the automation processes. I'll have to see/know what is(/are) the best and most secure way(s) to create users, how they can be created automatically, from the existing email (complete or the part before "@") or "pseudo"/"alias" field (without duplicates possible), for example. Or perhaps it would be better to "generate" a(n) (manual or automatic) "action" from time to time (with the "Admin Actions" module or another one/way) in order to create the users when new pages are created and the users for these pages haven't been created yet. Also, I'll have to find how to use the front-end editing for these users. So many (new) things/steps. I guess Models and Other artists users could have the same role. [ Post moved to https://processwire.com/talk/topic/18523-how-to-automatically-change-a-pages-parent-and-template-once-the-page-is-published/ ]
×
×
  • Create New...