Jump to content

xxxlogiatxxx

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

xxxlogiatxxx's Achievements

Jr. Member

Jr. Member (3/6)

0

Reputation

  1. Well file was corrupted. Admins have to check latest build.
  2. Hello people. I received some errors after upgrading from previous master version to latest 3.0.148 of PW. I replaced root index.php, wire directory and .htaccess file and now website doesn't work. It's showing me this error: Parse error: syntax error, unexpected end of file in /var/www/USERNAME/data/www/WEBSITENAME/wire/modules/Fieldtype/FieldtypeFile.module on line 1096 Debug mode: Parse Error: syntax error, unexpected end of file (line 1096 of /var/www/USERNAME/data/www/SITENAME/wire/modules/Fieldtype/FieldtypeFile.module) This error message was shown because: site is in debug mode. ($config->debug = true; => /site/config.php). Error has been logged. I tried to reupload file but no results still. Any ideas? Maybe it's a PHP version issue? My current version 7.2.16.
  3. Well i just refreshed modules. Topic can be closed now.
  4. I don’t know why, but menu stopped displaying link names. When I wanted to edit the site page I received this error: 2019-10-30 16:05:39 admin https://sitename.com/admin/page/edit/?id=1157 This request was aborted because it appears to be forged. (in /wire/core/SessionCSRF.php line 191) And now they are empty. Any ideas?
  5. That was my mistake i have to use default values. Thanks everyone ?
  6. Is there any ideas how to find pages by it's translated value of Select Options field title? For example i want to get pages in current language by some option title: Default: 1=Precious 2=Semi-precious Italian: 1=Preziosa 2=Semipreziosa No idea why italian version returned me empty results. $type = $sanitizer->text($input->get->type); $input->whitelist('type', $type); if($type) { $results = $pages->find("template=encyclopedia-item, encyclopedia_item_type.title={$type}, limit=5, sort=title"); } else { $results = $pages->find("template=encyclopedia-item, limit=5, sort=title"); } foreach($results as $result) { echo $result->title; } $data contain value Precious/Preziosa
  7. How to get all possible options from the select field in current language? This code always returns me options in default language: $field = $fields->get('encyclopedia_item_type'); $options = $field->type->getOptions($field); foreach($options as $option) { echo "<option>$option->title</option>"; } I can filter them by language through PHP and use $option->title1020 instead of $option->title foreach($options as $option) { echo "<option>$option->title1020</option>"; } But i believe there is a better way
  8. Hello guys. Can anyone explain how to get all page fields and return them as json? $myPages = $pages->find('template=catalog-item'); $data = $myPages->explode(['title', 'created', 'some_field']); echo wireEncodeJSON($data); This code returned me id, created date but there is no fields. I need something like array(title: "Page title", body: "Some text", image_url: "/images/123.jpg"). Any ideas?
  9. Hey guys. Need some little help for a newbie. How can i foreach all possible values from existing field of a child template into select form? Trying like this but it showing me results from created pages and their fields. $fields = $page->find("template=item, sort=item_type"); echo "<select>"; foreach($fields as $item) { echo " <option>{$item->item_type->title}</option> "; } echo "</select>";
×
×
  • Create New...