Skip to content

Commit

Permalink
Domain restrictions; bug fixes. (#145)
Browse files Browse the repository at this point in the history
* OI-246 Removed link to content from News title, fixed tags visibility on News page itself and inside the /news. Fixed "User page" condition submit logic.

* OI-206 Changed thumbnail style to compact_user_icon in next user view modes: additional details, default, edit.

* OI-243 Change OpenidealIdeaUpdateInfo create and change date formats. Fix CSS styles for right sidebar of content types canonical pages.

* OI-85 Fix CSS for workflow block, and mobile view of /idea page.

* Reverted composer.json changes.

* OI-243 Removed unneeded code.

* OI-125,142 Changed moderation content view title, and altered local task title. Changed slideshow arrows.

* OI-246. Implemented OpenidealRRSSBBlock, which provide ability to set an entity from context e.g. from layout builder. Implemented styles for /news page.

* OI-159 Implement: "user_mention" Message template, Rules action - "Create message after mentioning user". Add appropriate message_template texts for the message displayed itslef, email subject and body. Add additional conditions for "activity feed" views. Rework the MessageAction.

* OI-166 Replace the voting apis form's ajax submit handler. Implement logic to update the count of like in real time.

* OI-166 Add todo.

* OI-159 Implemented logic to change the showed text for user mention activity for current user page, and others users pages. Fixed the pswp image arrows on mobile screen. Fixed logic to send the message during user mentions only for mentioned user.

* OI-166 Fix bug related to rules, and voting, add additional condition to rules action. Reworked _openideal_challenge_vote_ajax_submit logic, add additional ajax command to response. Remove unneeded logic from scripts.

* OI-159 Move logic of changing the partial field into mentions entity preprocess.

* OI-159 Add delta to getText method.

* OI-242 Remove image button. OI-113 Increase size of the modal for entity browser.

* OI-00 Change the gulp script, remove source map and cleanCss gulp plugins.

* OI-166 Implemented new render element - Statistics theme for the element statistics_element, related twig template, ability to change attributes. Replace site_wide_statistics_block theme with statistics_item, reworked all blocks that used this theme. Implemented ability to set data-* attribute to statistics count, that adds ability to update counters in real time, without rely on css classes.

* OI-166 Add css files.

* OI-258 Implemented AutocompleteController and ideas_autocomplete_entity_reference views entity reference for ideas autocomplete. Add the ability to show autocomplete for title field of the Idea.

* OI-258 Reworked IdeasAutocompleteController to use entity_reference_selection plugin, implemented ability to add the url to autocomplete keys. Implemented script that listen "autocompleteselect" event, and redirects user on autocomplete selection. Implemented logic to show message after user being redirected into possible dublication page.

* OI-258 Change query parameter name.

* OI-00 npm audit fix.

* OI-166 Workflow identification fix.

* OI-255 Reworked the openideal_user_form_user_login_form_alter hook, implemented ability to add images for the login-with template and reworked the template itself. Create a custom block type for login right section. Implemented styles for login page. Installed and configured "Underline" js library, implemented related script to make it works.

* OI-255 Implement hook_update that creates a block_content for right login section, export the block via default_content module. Implement styles for register, reset password forms. Implement modile styles for login form. Add signup, forgot password links, and related to them styles|logic.

* OI-276 Composer dependencies fix.

* OI-275 Move all logic related to login block, into openideal_login. Create libraries. Reworked openideal_user hook install, to enable the login module. Move all related to block configurations into the block.

* OI-275 Move hook_user_login into login module.

* OI-255 Small fixes.

* OI-255: Add missed module dependencies, move appropriate configuration into config/optional folder.

* OI-255: Remove useless dependence.

* OI-159 Move cache context out from if statement.

* OI-113 Change width of entity browser entity configurations.

* OI-00 Remove logic that change behavior of html[type=date] input.

* OI-255: Remove position absolute from em.

* OI-282: Sets explicit version using commit hash for ajax_comments, ckeditor_mentions. Remove useless patch for rabbit_hole module, and set 1.0-beta9 version for it.

* Removed packages with hashes from composer.json

* Sorts packages alphabetically

* Adds ckeitor_mentions and ajax_comments here.

* OI-282: Update the rabbit_hole configurations.

* OI-282: Remove unused rabbit_hole configuration.

* OI-273: Fix Idea installation.

* OI-273: Rename shutdown function, change description.

* Add update instruction to README file.

* Add domain registration module.

* Change composer update command.

* Remove update section from README.

Co-authored-by: Zohar Stolar <z.stolar@gmail.com>
Co-authored-by: Ivan Doroshenko <i.doroshenko@dev-branch.com>
Co-authored-by: Ivan Doroshenko <57439293+db-Matroskeen@users.noreply.github.com>
Co-authored-by: Nazariy Velychenko <nazar.velychenko@ucb.com>
  • Loading branch information
5 people authored Feb 22, 2021
1 parent 6b4ddf6 commit da3be35
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
"drupal/config_pages": "^2.6",
"drupal/ctools": "^3.4",
"drupal/default_content": "^2.0",
"drupal/domain_registration": "^1.4",
"drupal/dropzonejs": "^2.1",
"drupal/email_registration": "^1.0",
"drupal/entity_browser": "^2.5",
Expand Down
29 changes: 28 additions & 1 deletion idea.install
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

use Drupal\user\Entity\User;
use Symfony\Component\HttpFoundation\Request;

/**
* Implements hook_install().
Expand All @@ -26,7 +27,7 @@ function idea_install() {

// Force set the administerusersbyrole configuration in fact
// the module change it during installation of profile.
// @Todo: Further investigation.
// @todo Further investigation.
\Drupal::configFactory()->getEditable('administerusersbyrole.settings')->set('roles', ['manager' => 'safe'])->save();

// To avoid issues with importing of configurations set system.site
Expand All @@ -36,4 +37,30 @@ function idea_install() {
->set('slogan', 'Ideas, challenges, news')
->set('page', ['front' => '/home'])
->save();

drupal_register_shutdown_function('_idea_rebuild_cache');
}

/**
* Force rebuild all Drupal's caches.
*
* Rules require clearing the cache to rebuild the container and register
* new rules events. Clearing cache in hook_install() didn't help, that's
* why it was moved to shutdown function.
*/
function _idea_rebuild_cache() {
$loader = require DRUPAL_ROOT . '/autoload.php';
include_once DRUPAL_ROOT . '/core/includes/utility.inc';

$request = Request::createFromGlobals();

// Clear user cache for all major platforms.
$user_caches = [
'apcu_clear_cache',
'wincache_ucache_clear',
'xcache_clear_cache',
];
array_map('call_user_func', array_filter($user_caches, 'is_callable'));

drupal_rebuild($loader, $request);
}

0 comments on commit da3be35

Please sign in to comment.