Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/06/2022 in all areas

  1. Yes, but be aware that this resolves the error by simply stripping out the asterisk. Which might be okay if the asterisk isn't an important part of the search phrase, but if you want to match pages according to the presence of the asterisk then you'll need to whitelist it.
    2 points
  2. Yes, you can use https://processwire.com/blog/posts/processwire-3.0.74-adds-new-fieldsetpage-field-type/ exactly for that so you can reuse other fields inside the FieldsetPage fields. Think of repeaters without repeating ?
    1 point
  3. @protro thanks ? If you have already your site content, you have two simple solutions: A. Using Duplicator: build a package remove all files and folders from the package2.zip and keep only the .sql.zip inside upload the installer.php file and the modified package2.zip on the root directory navigate to https://yoursite.com/installer.php and follow the instructions The modified package2.zip file content ? B. Using ProcessDatabaseBackups install the module upload or select a db file restore it ⚠️ As always, make a backup of everything before proceeding
    1 point
  4. Thank you for this terrific module. Sorry if basic question: What is best methodology for simply updating the database on a production server if the rest of the site content / processwire core have already been deployed?
    1 point
  5. It has come to my attention that this is not strictly true. The XHR header makes modern browsers send the CORS preflight request, so requiring config()->ajax for your requests on the server side can save your users from CSRF shenanigans.
    1 point
  6. I finally found , the new master release 0.0.10 works here with the latest FormBuilder release. Let me know if you encounter any issues.
    1 point
  7. I think it is totally ok to instantiate the script multiple times within the foreach.
    1 point
  8. Personally when I install a CMS I prefer to set it inside a subdirectory rather than the root folder. There are different reasons for this choice. For example you may wish to have different CMS installed in different subdirectories; or multiple copies or versions of Processwire in different subdirectories; keep separated directories for production and development; and so on. Sometimes this choice is taken also to obfuscate your CMS contents. In this forum I found some helpful hints, but I could not find a turn-key tutorial explaining the detailed steps for redirection and how to hide subfolder in urls' segments. It's pretty easy. Just let's do it step by step. We are going to create a new .htaccess file in the root folder (please note it is a new one, we will leave the .htaccess file in Processwire subfolder unchanged), where we will add the section described below. Just replace yoursite.com and yoursubfolder with ... your ones! # .htaccess in root directory # Redirect to Processwire subdirectory <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?yoursite.com$ RewriteCond %{REQUEST_URI} !^/yoursubfolder/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /yoursubfolder/$1 RewriteCond %{HTTP_HOST} ^(www.)?yoursite.com$ RewriteRule ^(/)?$ yoursubfolder/index.php [L] </IfModule> With this approach we can protect root files and subdirectories from redirection. Are we done ? Yes and no. After these modifications pages are redirected correctly, but in the browser link you will note that subfolder's name is still showing. This is not good, we want to hide it. We are just one step away. Let's open our site/config.php and add the following line at the end: /** * Set urls root to hide Processwire folder * This must be combined with .htaccess in root directory */ $config->urls->root = '/'; Do not forget to lock site/config.php after modifying it. If you prefer, instead of modifying config.php, you can place the above line in _init.php. And here it is! I hope this simple tutorial can be of help.
    1 point
×
×
  • Create New...