GithubHelp home page GithubHelp logo

cultuurnet / culturefeed Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 17.0 10.28 MB

Drupal module suite for building an event site based

Home Page: http://www.culturefeed.be

License: Apache License 2.0

PHP 85.89% JavaScript 9.48% CSS 0.64% Hack 4.00%

culturefeed's People

Contributors

30equals avatar alduya avatar bertramakers avatar cyberwolf avatar dietrichm avatar dizzymisslizzy avatar driesdeclercq avatar evertdemeyer avatar geertvd avatar hnln avatar jonasvhg avatar kristofser avatar laurensvandeput avatar leevingo avatar lukdens avatar nleroy avatar pfrenssen avatar robertstatik avatar sannejanssen avatar stalski avatar stijnswaanen avatar stiksels avatar svenhoutmeyers avatar swentel avatar thomasjacobswk avatar veerlehanssens avatar wtrv avatar zero2one avatar zuuperman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

culturefeed's Issues

Location (actor, not region) as Facet

Is there a possibility to have location (aka venue / space / etc.) as a facet filter so that a filtering can be done on a specific location for an event search. This is a recurring request from clients and I know this wasn't possible before, but quite some time/changes happened since last time I asked :)

culturefeed_search_item_load_by_title() function does not use its second parameter type

In the helpers.inc file the following function

function culturefeed_search_item_load_by_title($title, $type) {

  $search_string = trim($title);
  $parameters = array();
  $parameters[] = new \CultuurNet\Search\Parameter\Query('title:"' . $search_string . '"');
  $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('type:actor');
  $parameters[] = new \CultuurNet\Search\Parameter\Group();
  $result = culturefeed_get_search_service()->search($parameters);

  if ($result->getTotalCount()  > 0) {
    $items = $result->getItems();
    return $items[0];
  }

  return FALSE;

}

defines a $type which is never used, it inserts actor hard coded into the FilterQuery.

Add option to 'culturefeed-search-import-terms' drush command to first remove previously imported terms

Scenario: someone starts to build their website with acc.uitid.be. There are some terms there that do not belong on the production website, like "Test Charlotte" at the moment. They get imported by drush culturefeed-search-import-terms.

Before deploying the website to production, the terms from www.uitid.be should be used. You change the necessary settings of culturefeed to switch to www.uitid.be. You rerun culturefeed-search-import-terms. However, you end up with a combination of terms both from acc.uitid.be and www.uitid.be. To fix this, I suggest adding an option to the culturefeed-search-import-terms drush command which removes all terms before import. This option could be named '--clean'.

Issue met CalendarHTMLFormatter.php

Issue met de html formatter?

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/admin/web/oudenaarde.e2e.be/public_html/vendor/cultuurnet/calendar-summary/src/CalendarHTMLFormatter.php on line 28

Active filters block should not show search suggestions

ref. culturefeed_search_ui_search_active_filters_block()

The 'active filters' block not only outputs active filters, but also search suggestions. It should not do that, they are not related to eachother. The search suggestions should be split off to a separate block.

Searches with special chars (accents, umlauts) do not yield search results

The agenda search block in culturefeed_agenda (with the form generated by culturefeed_agenda_search_block_form) has a problem with searches that contain special characters (like accents and umlauts)

For example:

When searching for the string "Pierre Célice" (agenda/search?search=Pierre%20Célice) no results are found.
When searching for the string "Pierre Celice) (agenda/search?search=Pierre%20Celice) the correct result is found => Pierre Célice - Rhythms en Collages (agenda/e/pierre-celice-rhythms-en-collages/76deead9-b8a5-4a58-b6f5-701c9daf768a)

Only works on 5.5

The Read me states that PHP5.5 is the minimum requirement for the module to work.
I was working on PHP5.6 and it didn't work. Could not log in with UIT, and thus I could not add any events through the Entry API, and my agenda/search page didn't work either.

Changed my PHP version to 5.5 and everything works now.

Entry API - not working ?

Hey hey,

I'm trying out the Entry API Drupal module at the moment without any success.
Started from the master branch and going through the setup as mentioned in the wiki.
At 'agenda/e/add' i get the 'An error occurred while saving the event' error.

Yes, i have a validated consumer key/secret set, which i entered in the entry api info form.

Because this doesn't work, i tried using the install profile, where i get the exact same error (and more -- i'll document this later). Here i also noticed that the 'develop' branch is checked with the make file...?

Anyway, i have the impression that it's failing in in culturefeed/lib/Drupal/DrupalCultureFeedBase at line
#156 because the logged in user doesn't have any tokens assigned.

But with the install profile i even logged in with oath, and tried to create an event (yes - i set the right permissions) and still got that same error..

Now, or i am missing something - although i read the full Wiki numerous times, and checked the pages at http://tools.uitdatabank.be/docs/entry-api-content-beheer as well - ?

It would be nice to have my issue validated by the cultuurnet folks - or if you don't come across the same issues, provide a somewhat detailed guide to get this working.

Thanx!

Missing dependency on the culturefeed base module

Hai guys,

The culturefeed_agenda module uses some functions that are defined in the culturefeed.helpers.inc file.
If you don't have the culturefeed module enabled, the culturefeed_agenda will throw an fatal error when it's trying to use the helper function.

Cheers

uitpas_ui blokkeert cnapi_ui

Als uitpas_ui ingeschakeld is, dan herschrijft die via uitpas_ui_preprocess_cnapi_ui_event_summary() de links naar de detailpagina's van events, zoals weergegeven op bijv. een zoekresultaten pagina.

De standaard linkstructuur agenda/e/%event-name/%event-id wordt in die preprocess functie herschreven naar activity/%event-name/%event-id waardoor detailpagina's resulteren in een 'Pagina niet gevonden'-pagina.

Mijn huidige workaround: uitpas_ui uitschakelen.

Drupal 8 roadmap

What are the plans for Drupal 8 support. This question is relevant now due to Drupal 8 being in RC phase.

Robots

Na het inschakelen van de modules staat de meta tag meta name="robots" content="noindex, follow" globaal ingesteld op alle pagina's....

Make culturefeed module a dependency for culturefeed-agenda

Hi,

I installed the culturefeed-agenda module but but not the base culturefeed module.
This resulted in wsod on agenda search pages with query parameters.
error:
PHP Fatal error: Call to undefined function culturefeed_set_noindex_metatag() in /pathToRootOfProject/sites/all/modules/contrib/culturefeed/culturefeed_search_ui/includes/helpers.inc on line 168

Fixed this by enabling the culturefeed base module.
Since this function was in culturefeed.helpers.inc .

Detail pages of "productions" throw fatal errors

There are some "production" results on the test engine. If I follow a search result that returns a "production" I get the following fatal error:

Fatal error: Call to undefined method CultureFeed_Cdb_Item_Reference::getEntity() in /profiles/culturefeed_kickstart/modules/culturefeed/culturefeed_agenda/includes/helpers.inc on line 163

Example URL: agenda/p/in-de-wolken/a6063e83-f98e-4824-b413-bec0254bd035

Add support for drupal composer_manager

Problem

Modules like composer_manager are used when using PHP packages in Drupal 7. These modules detect composer.json files within modules and agregate them when one of these modules is installed and remove their dependencies when they are uninstalled.

Installation of the culturefeed module fails When using culturefeed in combination with the composer_manager module.

Cause

The implemented culturefeed_menu() hook calls CultureFeed::AUTHORIZE_TYPE_REGISTER but the composer autoloader is not loaded yet during the installation of a new module. (Enable/Disable is not a problem).

$items['culturefeed/oauth/connect/register'] = array(
    'title' => 'Connect',
    'page callback' => 'culturefeed_oauth_connect',
    'page arguments' => array(CultureFeed::AUTHORIZE_TYPE_REGISTER),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'culturefeed.pages.inc',
  );

Solution

Us a as string (or Drupal constant) to pass the page argument.

$items['culturefeed/oauth/connect/register'] = array(
    'title' => 'Connect',
    'page callback' => 'culturefeed_oauth_connect',
    'page arguments' => array('register'),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'culturefeed.pages.inc',
  );

Lost required packages in v3.4.1

In v3.4.1 the required packages cultuurnet/search: ~1.0 and cultuurnet/culturefeed-php: ~1.1 are lost.

Because of this the culturefeed_search module doesn't work anymore. Is this the expected behavior after updating?

culturefeed_entry_ui tabs should not override existing tabs

Problem

culturefeed_entry_ui adds 4 tabs to an event detail page (depending on the access levels):

  • view : agenda/e/%/%culturefeed_agenda_event
  • edit : agenda/e/%/%culturefeed_agenda_event/edit
  • tags : agenda/e/%/%culturefeed_agenda_event/tags
  • collaboration : agenda/e/%/%culturefeed_agenda_event/collaboration

This is done by overriding any existing item:

  $data['tabs'] = array(
    0 => array(
      'output' => $tabs,
      'count' => count($tabs),
    ),
  );

The alter should add items, not replace.

Solution

Replace the code by an add operation:

  // Clean state to start with.
  if (empty($data['tabs'])) {
    $data['tabs'] = array(
      0 => array(
        'output' => array(),
        'count' => 0,
      ),
    );
  }

  $data['tabs'][0]['output'] = array_merge($data['tabs'][0]['output'], $tabs);
  $data['tabs'][0]['count'] += count($tabs);

Bonus

The tab items are rendered using the wrong theme function:

  • Replace menu_local_action by menu_local_task in $tab = array('#theme' => 'menu_local_action', '#link' => $link);

The tabs are not active when they point to the currently active page.

  • Add #active to the tab array when arg(4) === the tab action.
    $tabs[] = array(
      '#theme' => 'menu_local_action', 
      '#link' => $link,
      '#active' => arg(4) === 'edit',
    );

Gerelateerde activiteiten

Als ik de blok gerelateerde activiteiten inschakel werk deze zoals het moet, zodra ik iets wijzig in het blok form zie ik de ajax lader maar geen activiteiten...

Vliegje

Wij kregen de vraag om het “vliegje” te tonen bij zowel de teaser en de detailpagina van een activiteit,
Hoe passen we dit toe, ik zie geen variabele voor het vliegje in de tpl bestanden…

Solr search parameters (eg relevancy boost, keywords) are reflected in search suggestions

This has been split off from #12.

There is a relevancy boost in CultureFeedSearchPage::execute():

     // Add in a boost for sort-type "relevancy".
     if ($params['sort'] == 'relevancy') {
       $this->query[0] = '{!boost%20b=sum(recommend_count,product(comment_count,10))}' . $this->query[0];
     }

I discovered in that issue that this code was not working. When I fixed the problem I noticed that this local parameter is used for generating search suggestions:

Active filters
Bedoelde je {!type=boost b=sumo(commandant,product(commentaren,10))}muziek

The same thing happens if I alter the search query and add keywords for example, the resulting search query is used to generate search suggestions:

Active filters
Bedoelde je draadje AND keywords:"broodje brussel"

The suggestions should filter out these special search parameters.

Notice: Undefined variable: uitpas_promotions in culturefeed/culturefeed_agenda/theme/culturefeed-event.tpl.php on line 169

A notice is triggered by the template culturefeed/culturefeed_agenda/theme/culturefeed-event.tpl.php on line 169 when the UiT pass module is not enabled.

This because the template expects a variable, set by uitpass submodule, is always set.

  <?php if ($uitpas_promotions): ?>
  <dt><?php print t('Promotions'); ?></dt>
  <dd class="promotions"><?php print $uitpas_promotions; ?></dd>
  <?php endif; ?>

Drupal 8 status

Are there any plans to continue working on the Drupal 8 branch? Would love to convert our current site to D8.

Date Facet counts are incorrect

The facet count for inactive items is incorrect for some of the predefined dates. After clicking on them, the right count appears.
Since the site with the issue is still under development, I can only show screenshots unfortunately.

screen shot 2015-04-23 at 21 25 23
screen shot 2015-04-23 at 21 25 01

Page not found when using faceted search

I'm using the kickstart version with the latest 3.x.

  • Visit "agenda/search".
  • Enter "3500" for the "Where" facet (directly typed into the textfield, without selecting anything from the autocomplete suggestions).
  • Click "Ok"

Instead of the search results I am shown a 404 page with path "agenda/alle/" and the following notices:

Notice: Undefined offset: 1 in culturefeed_agenda_url_outbound_alter() (regel 363 van profiles/culturefeed_kickstart/modules/culturefeed/culturefeed_agenda/culturefeed_agenda.module).
Notice: Undefined offset: 1 in culturefeed_agenda_url_outbound_alter() (regel 364 van profiles/culturefeed_kickstart/modules/culturefeed/culturefeed_agenda/culturefeed_agenda.module).
Notice: Undefined offset: 1 in culturefeed_agenda_url_outbound_alter() (regel 364 van profiles/culturefeed_kickstart/modules/culturefeed/culturefeed_agenda/culturefeed_agenda.module).
Notice: Undefined offset: 1 in culturefeed_agenda_url_outbound_alter() (regel 366 van profiles/culturefeed_kickstart/modules/culturefeed/culturefeed_agenda/culturefeed_agenda.module).

culture feed agenda theme facets

Hi,

In the previous version of the culture feed module, there was a "what" facet block(cnapi module).
This block allowed faceted filtering based on the theme/type of the activities on search pages.
In the current culture feed module I can't seem to find it in code or configuration.

Has this feature been removed?
If yes, Is it possible to rebuild it myself?

Frank

Thema in search block

De categorieën select box bij de “search events” blok blijft leeg, hoe lossen we dit op?
Ik weet dat we via de “Filter form” blok zelf categoriefilters kunnen toepassen maar dit zou automatisch moeten kunnen…

Fatal error: Call to a member function getCopyright() on null in culturefeed/culturefeed_agenda/theme/theme.inc on line 306

The preprocess function uses the $photo variable but it should be the $image variable instead.

Bad

        foreach ($images as $image) {
          $pictures[] = $image->getHLink();
          if ($image->isMain() && empty($main_picture)) {
            $main_picture = culturefeed_get_relative_image($image->getHLink());
            $main_picture_cr = $photo->getCopyright();
          }
        }

Good

        foreach ($images as $image) {
          $pictures[] = $image->getHLink();
          if ($image->isMain() && empty($main_picture)) {
            $main_picture = culturefeed_get_relative_image($image->getHLink());
            $main_picture_cr = $image->getCopyright();
          }
        }

exception 'Exception' with message 'Not a valid token set.'

Trying to use the events_cdb module

I have put the key+secret in the config for the application.

exception 'Exception' with message 'Not a valid token set.' in /var/www/.../sites/all/modules/custom/culturefeed/lib/Drupal/DrupalCultureFeedBase.php:98
Stack trace:
#0 /var/www/.../sites/all/modules/custom/culturefeed/lib/Drupal/DrupalCultureFeed_EntryApi.php(49): DrupalCultureFeedBase::getLoggedInUserInstance()
#1 /var/www/.../sites/all/modules/custom/events_cdb/events_cdb.sync.inc(177): DrupalCultureFeed_EntryApi::createEvent(Object(CultureFeed_Cdb_Item_Event))

The user doesn't seem to have any token. Are they supposed to be different than the site/application ones? Is there a way to link them? Is there something to do at the permission level?

You have no idea how hard is it to use a library that isn't documented ;)

301 redirects loop

When in agenda/search as soon as I filter on eg. Type, the url redirects to agenda/doen.

However I the page never loads because I get stuck in an endless redirect loop (301).

When I comment out the redirect rule (see link below) everything seems to work correct.
culturefeed_agenda.module : line 964

What seems to happen is:

  • the $rewrite is set To true (because agenda/bezoeken != agenda/search )
  • the url is redirected
  • the $rewrite is set To true(because agenda/bezoeken != agenda/search )
  • url is redirected again ...
  • ...

Don't know If it has to do with something set up in our site or that this is a general issue.

Undefined $uitpas_user

Undefined variable $uitpas_user on line 13 in file user_register.inc ( Submodule: Culturfeed_uitpas)

Sort on time

De activiteiten in het agenda overzicht worden niet goed gesorteerd, deze worden wel goed op dag gesorteerd maar niet op tijd of aanvangsuur…

HTTP ERROR 500

We have a problem with the installation:

composer diagnose
Checking composer.json: FAIL
require.mobiledetect/mobiledetectlib : unbound version constraints (dev-master) should be avoided
Checking platform settings: FAIL
The OpenSSL library (0.9.8o) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.

Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: FAIL
You are not running the latest stable version, run composer self-update to update (1.0.0 => 1.0.3)

composer validate
./composer.json is valid, but with a few warnings
See https://getcomposer.org/doc/04-schema.md for details on the schema
require.mobiledetect/mobiledetectlib : unbound version constraints (dev-master) should be avoided

composer self-update
Updating to version 1.0.3.
Downloading: 100%

[ErrorException]
rename(/usr/local/bin/composer): failed to open stream: Permission denied

self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys] [--stable] [--preview] [--snapshot] [--] []

Saving Location Cdb

Is it possible to save a Location to the UIT database?

Upon saving a location node, I want to create a new Location in UIT, but I can't find a way to do this using Culturefeed.

After checking the REST docs for the Entry API, I couldn't find anything either.

Could it be that the documentation is outdated, and that meanwhile there is a way to do this? Or is it just not possible?

Thanks in advance.

Entry API - Recurring events

It looks like it's not possible to add a recurring event through the entry API.
Is this correct?
Because it's possible through UITDatabank.
Will this feature be implemented?

screen shot 2015-09-11 at 2 06 24 pm

Error when enabling via drush

I got this error when trying the module to be enabled with drush

Drush command terminated abnormally due to an unrecoverable error.[error]
Error: Class 'CultureFeed' not found in
docroot/sites/all/modules/culturefeed-master/culturefeed.module, line 81

any ideas

Mobile_detect not found in _culturefeed_agenda_preprocess_agenda

Inside the _culturefeed_agenda_preprocess_agenda function the mobile detect helper function is called. This function checks / uses the external Mobile_Detect php class.
When you don't use this class, the drupal DB log get's filled with class not found notices, generated by the helper function.
However this external class is not required, and doesn't get added by any composer files. This is good, since it's not needed to use. And this plugin wouldn't work correctly with the drupal page cache. So the actual issue is to not write those messages to the watchdog table.

Notice: Trying to get property of non-object in culturefeed_entry_ui/culturefeed_entry_ui.module on line 200

Problem

When

  • You are not logged in but not as a Culturefeed user
  • You open an event detail page
  • Following notice is shown:
Notice: Trying to get property of non-object in culturefeed/culturefeed_entry_ui/culturefeed_entry_ui.module on line 200

Cause

The Culturefeed user is loaded and used without checking if there was an object returned.

  $culturefeed_user = DrupalCultureFeed::getLoggedInUser();

  // Add tab for editing the event.
  if (user_access('edit culturefeed events') && ($event->getEntity()->getCreatedBy() == $culturefeed_user->mbox)) {

Sollution

Add a check if we have a logged in user.

Remove all non-generic theming

The templates contain theming which seems to be intended for a specific theme, and is not applicable to all themes. Users of the module suite are practically forced to override every template file, theme function and even render arrays generated in code.

An example:

      <i class="icon-remove icon-large text-red"></i><span class="hidden">verwijder</span>

The classes 'icon-large' and 'text-red' are pointless in most theme implementations and are not semantically correct. In most themes this icon would not be present. The word "verwijder" is not translatable.

Another example, which is in code, also contains an icon which would not exist in most themes and might actively break certain themes because of the 'pull-right':

'#markup' => '<p class="pull-right">' . l('<i class="icon-pencil"></i> ' . t('Manage your actions'), 'culturefeed/activities', array('html' => TRUE, 'attributes' => array('class' => array('manage-activities-link')))) . '</p><div class="clearfix"></div>',

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.