← Back to team overview

mahara-contributors team mailing list archive

[Bug 1745042] Re: Social profile icon causing warning in Elasticsearch display

 

hi @robertl,

I've dug around a bit more. The bug appears (i.e. icon not set) when the
user logged in does not match the record owner.

That is, in

search/elasticsearch/type/ElasticsearthType_artefact.php::getRecordDataById()

It checks:

if ($USER->get ( 'id' ) == $record->owner) {

If this does not match, the icon and link are not set.

And, the error is generated.

So, I think the check needs to happen in the template if those values
are missing.


What do you think ?


And, this is how we can test for it.


Thanks,
Ghada

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1745042

Title:
  Social profile icon causing warning in Elasticsearch display

Status in Mahara:
  In Progress
Status in Mahara 17.10 series:
  Confirmed
Status in Mahara 18.04 series:
  In Progress

Bug description:
  Mahara: 17:10.2  (2017092611)
  OS: Linux 16.04
  DB: Postgres
  Browser: any

  An warning is displayed (and debug is on) when using Elastisearch when
  searching on data. Please refer to attached image of warning.

  We are using the raw_old theme but it's also present in raw.

  I haven't been able to track down the data itself but I can see that
  it stems from a social profile not having a relevant icon. And, I can
  track it down to:

  /htdocs/search/elasticsearch/type/ElasticsearchType_artefact.php::getRecordDataById
  - lines 353-356

  
  If the array $icons is empty, the properties: link and icon

  do not get set.

  Which leads to this warning in the template:

  /htdocs/theme/raw_old/plugintype/search/elasticsearch/templates/artefact.tpl

  on line 15.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1745042/+subscriptions


References