k07n

Members
  • Content count

    101
  • Joined

  • Last visited

Community Reputation

91 Excellent

About k07n

  • Rank
    Distinguished Member
  • Birthday 03/18/1980

Profile Information

  • Gender
    Male
  • Location
    Samara, Russia

Recent Profile Visitors

7,063 profile views
  1. I have resolved my case with nginx maps, maybe someone finds this usefull. Put all redirects to site-redirect.map map $request_uri $redirect_uri { /index.php?id=1 /page/; /index.php?id=53 /another/page/; /index.php?id=62 /and/so/on/; } Nginx looks thru the list, and if it finds $request_uri match line in left column - it set $redirect_uri = value of right side of line ($redirect_uri var can be named as you want). Then include site-redirect.map in http section of nginx config. Now we must check for $redirect_uri in server section and if it is set - redirect to new URI, just like that: include site-redirect.map; server { # … if ( $redirect_uri ) { return 301 $redirect_uri; } } If map is big enought you may need to set map_hash_bucket_size to bigger value (in http section). Here is some more examples to play with: map $request_uri $redirect_uri { # ... ~/post-(?<id>\d+)\.html /post/$id/; ~*/catalog/(?<page>.+)\.html?$ /goods/$page/; } (~)o
  2. @Wanze I'm using $storageLocation = realpath(wire('config')->paths->root . $field->get('storageLocation')) . DIRECTORY_SEPARATOR; and ./../secure_files/ in Storage Location prefs. And I get "D:\osp\domains\secure_files\" on dev env and "/var/www/sitename/secure_files/" on live.
  3. @Wanze any success on this?
  4. Is it possible to use relative paths in storageLocation? I have different environment on local/live servers and it would be nice to have same value. Something like this: //$storageLocation = rtrim($field->get('storageLocation'), '/') . '/'; $storageLocation = realpath($field->get('storageLocation')) . DIRECTORY_SEPARATOR;
  5. @adrian one more thing: nothing happens on this: $modules->get('ProcessTableCsvExport'); // load module $pages->get('/clients/')->client_emails->exportCsv(',', '"', 'csv', '|', true);
  6. Hi! I am getting an error on export: Uncaught Error: Call to a member function getColumns() on null in \site\assets\cache\FileCompiler\site\modules\TableCsvImportExport\ProcessTableCsvExport.module:108 Stack trace: #0 \site\assets\cache\FileCompiler\site\modules\TableCsvImportExport\ProcessTableCsvExport.module(62): ProcessTableCsvExport-&gt;exportCsv() #1 \wire\core\Wire.php(374): ProcessTableCsvExport-&gt;___execute() #2 \wire\core\WireHooks.php(698): ProcessWire\Wire-&gt;_callMethod('___execute', Array) #3 \wire\core\Wire.php(402): ProcessWire\WireHooks-&gt;runHooks(Object(ProcessTableCsvExport), 'execute', Array) #4 \wire\core\ProcessController.php(244): ProcessWire\Wire-&gt;__call('execute', Array) #5 \wire\core\Wire.php(374): ProcessWire\ProcessController-&gt;___execute() #6 \wire\core\WireHooks.php(698): ProcessW in <b>\site\assets\cache\FileCompiler\site\modules\TableCsvImportExport\ProcessTableCsvExport.module</b> on line <b>108</b><br /> testing on: PW 3.0.52 @ php7.1 PW 3.0.48 @ php5.6.12 UPD: ProFields Table v0.1.5
  7. Thanks. I use nginx, but I get the idea.
  8. Hi! I have a jumplink with wildcard: source: index.php?id={id} destination: {id|oldsiteid} I don't know when (after PW3 update, or Jumplinks module update), but this jumplink stopped working, site.com/index.id=123 just redirects to site.com now. Any ideas why it's happens?
  9. What about if($PwVersion >= 3) to if($PwVersion >= 2.8) ?
  10. Anyone have tested hannacode in PW3? When I use [[image src=pic1.jpg]] in PW2 — Hanna trim quotes and sends pic1.jpg to src var, but in PW3 it includes "" to string and looks like src=>"pic1.jpg", so in the rendered code I get _quot_pic1.jpg_quot_ p.s. [[image src=pic1.jpg]] and [[image src=pic1.jpg]] works fine but...
  11. Just insert space after php: <?php } ?> And I think it is good to use alt syntax in your examle, it is easier to read: <?php if (condition): ?> <div>bla-bla-bla</div> <?php endif; ?>
  12. What is of() Baby don't hurt me Don't hurt me no more can't stop singing
  13. Check FILES TAB in "home" template. There is a field Alternate Template Filename. I think you have basic-page in it. https://yadi.sk/i/c5BnArQoiEpSR
  14. Change "Grupp1" in "Selector=Grupp1" to ID of the page Grupp1