error fix in the publication process

This commit is contained in:
Arno Kaimbacher 2019-02-19 18:52:52 +01:00
parent ef0b5131ce
commit b7b04a61d6
6 changed files with 35 additions and 36 deletions

View File

@ -54,21 +54,20 @@ class SearchController extends Controller
}
}
public function search1(Request $request): View
{
$this->_request = $request;
$data = $request->all();
// public function search1(Request $request): View
// {
// $this->_request = $request;
// $data = $request->all();
// $this->searchtype = $request->input('searchtype');
$this->searchtype = $request->input('searchtype');
return view('frontend.solrsearch.index');
}
// return view('frontend.solrsearch.index');
// }
public function search(Request $request): View
{
Log::info('Received new search request. Redirecting to search action of IndexController.');
$this->_request = $request;
//$filter =$request->input('query');
$filter =$request->input('query');
// $query = $this->client->createSelect();
// $query->setQuery('%P1%', array($filter));
// // $query->setQuery('*:*');
@ -91,9 +90,9 @@ class SearchController extends Controller
$results = $this->resultList->getResults();
$numOfHits = $this->numOfHits;
return view('frontend.solrsearch.index', compact('results', 'numOfHits'));
return view('frontend.solrsearch.index', compact('results', 'numOfHits', 'filter'));
}
return view('frontend.solrsearch.index');
return view('frontend.solrsearch.index', compact('filter'));
}
/**

View File

@ -391,8 +391,8 @@ class IndexController extends Controller
if (isset($data['geolocation'])) {
$formGeolocation = $request->input('geolocation');
if ($formGeolocation['xmin'] !== '' && $formGeolocation['ymin'] !== '' &&
$formGeolocation['xmax'] !== '' && $formGeolocation['ymax'] !== '') {
if ($formGeolocation['xmin'] !== null && $formGeolocation['ymin'] !== null &&
$formGeolocation['xmax'] !== null && $formGeolocation['ymax'] !== null) {
$geolocation = new GeolocationBox($formGeolocation);
$dataset->geolocation()->save($geolocation);
}

View File

@ -26,16 +26,16 @@ class Dataset extends Model
const UPDATED_AT = 'server_date_modified';
const PUBLISHED_AT = 'server_date_published';
// protected $fillable = [
// 'type',
// 'language',
// 'server_state',
// 'creating_corporation',
// 'project_id',
// 'embargo_date',
// 'belongs_to_bibliography',
// ];
protected $guarded = [];
protected $fillable = [
'type',
'language',
'server_state',
'creating_corporation',
'project_id',
'embargo_date',
'belongs_to_bibliography',
];
//protected $guarded = [];
/**
* The attributes that should be mutated to dates.
*

20
composer.lock generated
View File

@ -1232,16 +1232,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.2.0",
"version": "v4.2.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a"
"reference": "5221f49a608808c1e4d436df32884cbc1b821ac0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a",
"reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5221f49a608808c1e4d436df32884cbc1b821ac0",
"reference": "5221f49a608808c1e4d436df32884cbc1b821ac0",
"shasum": ""
},
"require": {
@ -1279,7 +1279,7 @@
"parser",
"php"
],
"time": "2019-01-12T16:31:37+00:00"
"time": "2019-02-16T20:54:15+00:00"
},
{
"name": "paragonie/random_compat",
@ -3664,16 +3664,16 @@
},
{
"name": "phpunit/phpunit",
"version": "7.5.4",
"version": "7.5.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "2896657da5fb237bc316bdfc18c2650efeee0dc0"
"reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2896657da5fb237bc316bdfc18c2650efeee0dc0",
"reference": "2896657da5fb237bc316bdfc18c2650efeee0dc0",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9",
"reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9",
"shasum": ""
},
"require": {
@ -3744,7 +3744,7 @@
"testing",
"xunit"
],
"time": "2019-02-07T14:15:04+00:00"
"time": "2019-02-18T09:24:50+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",

View File

@ -3,7 +3,7 @@
{!! Form::text('query', null, array('class'=>'pure-input-1', 'placeholder'=>'Search for a dataset...')) !!}
{!! Form::text('query', isset($filter) ? $filter : '', array('class'=>'pure-input-1', 'placeholder'=>'Search for a dataset...')) !!}
<!--<div id="edit-submit-search-wrapper" class="form-item">
<span class="form-submit-wrapper">

View File

@ -98,13 +98,13 @@
{!! Form::label('TitleAbstract', 'Main Abstract ') !!}
{{ Form::textarea('TitleAbstract[Value]', null, ['class' => 'pure-u-23-24',
'size' => '70x6', 'v-model' => 'dataset.abstract_main.value', "v-validate" => "'required|min:3'",
"data-vv-as" => "Main Abstract", 'data-vv-scope' => 'step-2']) }}
"data-vv-as" => "Main Abstract", 'data-vv-scope' => 'step-1']) }}
</div>
<div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('AbstractLanguage', 'Abstract Language..') !!}
<div class="select pure-u-23-24">
{!! Form::select('TitleAbstract[Language]', $languages, null, ['placeholder' => '--no language--', 'v-model' => 'dataset.abstract_main.language',
"v-validate" => "'required'", "data-vv-as" => "Abstract Language", 'data-vv-scope' => 'step-2']) !!}
"v-validate" => "'required'", "data-vv-as" => "Abstract Language", 'data-vv-scope' => 'step-1']) !!}
</div>
</div>
<div class="pure-u-1 pure-u-md-1-2 pure-div">