texts: Getting wrong output after implemented `theme_item_list`

texts:
I have Drupal version 7.41 and I am using xubuntu 14.04 as my OS.

I have a module that displays footer links as a list. The module will fetch available links from the database and show them in individual blocks. Here is my fetch function:

function footer_links_footerblock_contents($variables) {
switch ($variables) {
    case 'group_1':
        $query = db_select('footer_links', 'fl')
                ->fields('fl', array('name'))
                ->condition('fl.group', 1);
        break;
    case 'group_2':
        $query = db_select('footer_links', 'fl')
                ->fields('fl', array('name'))
                ->condition('fl.group', 2);
        break;
    case 'group_3':
        $query = db_select('footer_links', 'fl')
                ->fields('fl', array('name'))
                ->condition('fl.group', 3);
        break;
    case 'group_4':
        $query = db_select('footer_links', 'fl')
                ->fields('fl', array('name'))
                ->condition('fl.group', 4);
        break;
    case 'group_5':
        $query = db_select('footer_links', 'fl')
                ->fields('fl', array('name'))
                ->condition('fl.group', 5);
        break;
}

return $query->execute();
}

The result array produced from the $query->execute(); will be going to my module's block_view function:

function footer_links_block_view($delta = '') {
switch ($delta) {
    case 'group_1':
        $block['subject'] = t('Footer Group 1');
        if (user_access('access content')) {
            $result = footer_links_footerblock_contents($delta);
            $items = array();
            foreach($result as $node) {
                $items[] = $node->name;
            }
            if (!empty($items)) {
                $block['content'] = theme('item_list', $items);
            }
            else {
                $block['content'] = t('');
            }
        }
        break;
    case 'group_2':
        $block['subject'] = t('Footer Group 2');
        if (user_access('access content')) {
            $result = footer_links_footerblock_contents($delta);
            $items = array();
            foreach($result as $node) {
                $items[] = $node->name;
            }
            if (!empty($items)) {
                $block['content'] = theme('item_list', $items);
            }
            else {
                $block['content'] = t('');
            }
        }
        break;
    }
    return $block;
}

In there I used the theme function theme('item_list', $var) to display them as a list. I have overridden the theme function like this in my template.php file:

function mytheme_item_list($variables) {
$output = '
';
$output .= '
';

foreach ($variables as $member) {
    $output .= '
' . $member . '
';
}

$output .= '

'; return $output;
}

And here is my problem. When I looked at the output in the footer section, I see list items that are not even in my database in which I fetch. I see 'Array', 'ul', 'item_list' extra added list items. What is the source of this extra output? Am I not properly overriding the theme function?


texts: "Language neutral" is not available for content

texts:
On a standard multilingual Drupal installation (Drupal 8.6.10), when editing existing content or creating new content the option language neutral isn't available; only the enabled languages and some other options are shown.

How do I select Language neutral?


texts:
I have a D8 entity reference field question. I have 3 content types: Student, Class, Book.

A student can have several classes and a class can have several books.
I have in student an entity reference field of type content connected to classes. I have in class an entity reference field connected to books.

In a view (block student class book) I want to show the student name, his/her classes and the books associated with each class.

I am able to create a view showing the student and it's classes (using the relationships option in a advance) but the books are not showing up!

Please can somebody help? Thanks


texts: Table Views - dropdown filter on each columns

texts:
I have a simple view, Format:Table, and I want to expose filter on each column (dropdown list).

But some of my table fields are Global: PHP so I cannot add them on the FILTER CRITERIA section....

Is there a simple module that create filter on each column?


texts: Programmatically save image together with its ALT

texts:
I am not sure what is the benefit of using system_retrieve_file mentioned on Save image from URL to a field from a custom module, so I just use the following simple code to save image programmatically:

    $file = file_save_data(file_get_contents($url), file_default_scheme().'://field/image/'.basename($url));
    $file->status = 1;
    $node->field_image['und'][0] = (array)$file;
    node_save($node);

Works fine, so now I am trying to figure out how to save the enabled alt value which is stored in $alt variable.

When I output what the $file array contains with dsm(print_r($file,true)); it shows only:

stdClass Object
(
[fid] => 9
[uri] => public://field/image/150304192032_monalisa_624x351_afp_0.jpg
[filename] => 150304192032_monalisa_624x351_afp.jpg
[filemime] => image/jpeg
[uid] => 1
[status] => 1
[timestamp] => 1425596902
[filesize] => 28642
)

Unfortunately, it doesn't contain neither title or alt. Could anyone help me to get this sorted out? Thanks!


texts: Does drush up do a database backup/dump?

texts: Does running drush up run a database backup? From testing, it looks like it doesn't. Should I be doing a separate database backup before I run drush up to update?


texts:
How can I output nodes which linked with taxonomy term through a view?
How can I link taxonomy vocabulary with a view wich will output appropriate nodes for each term of this vocabulary?

In Drupal 7 we have two modules:

Taxonomy Display (is not present in D8).
Taxonomy Views Integrator (is raw in D8).


texts: How to handle duplicate .module files that live in 2 places?

texts:
I have not used Drupal before and have been thrown a project to fix up some things.

But I noticed the file I need to edit lives in two places:

one in includes/jobs.module.
another one in sites/all/modules/jobs/jobs.module.

Is one meant to be a sym link of the other or something? As this is not the case in the project I have been given. What file should I be editing?

I'm sure this is basic stuff for and Drupal dev. An suggetions?


texts: How to get a field third party settings for every content entity forms

texts:
Can someone explain or post an example of how to get a third party field settings on every content entity forms?

I'm looking for a generic code where a form can be customized (like calling a custom validator) if any field present in that form is having the third party settings that I have defined.

It could be a node form, a block form, a paragraph etc.


texts: How to add text or description in a form without writing a module?

texts:
In my fictitious content type form, I have this select/radio question:

"Do you want the pie ingredients?"
yes|Yes
no|No

If the user selects "Yes", then a block of text needs to show up

2 spoons of sugar
1 cup of milk
4 cups of flour
etc...

How do I do this without writing a module?  Why can't I create a custom field of type label/text?  I am already using the conditional fields module so I can make the visibility/hidden fields happen, but it only applies to a field.  Is there a way to inject/embed my text into the form?

As far as I know, there is no way to create custom text within a form unless I write my own module, which I would rather not do!


texts: How to theming and deploy custom blocks which created in admin UI?

texts:
I've created some custom blocks in my development environment and export them with Features + FE Block with given machine names. And then deploy and enable them in my staging environment.

Just like the sample below, the blocks with same machine name have different block ids in different environments, but I want the guide block has a special layout than other blocks.

development
    block-block-1 (guide)
    block-block-2 (case_links)

staging
    block-block-1 (case_links)
    block-block-2 (guide)

Because in different environments the guide block has different block_id, I can't just use the block id as the identifier to apply these css rules.

What should I do to solve this problem?


texts:
I am new to drupal So
I want to redirect the user based on login
Say,
if there is an Anonymous user, he will be redirected to specific page,
and if is an Authorized user along with login id and password, then he will be redirected to other specific page using script


texts: How do I run a site from a sub-directory?

texts: Maybe I'm making this way more complicated than I need to, but I want to serve my Drupal site that I've installed at example.com/drupal from example.com.  This particular site is an add-on site on my shared host, so the actual file structure is public_html/example.com/drupal.  What do I need to modify: .htaccess or add a redirect in cPanel?  I can't imagine I'm doing anything radical here, but there's no clear-cut answer in all my searching.


texts: Based on user's country filter content of same country?

texts:
Please find my problem statement here:

  Show all contents of Type "Test" belongings to that country to corresponding user of that country

My Approach:

Created a taxonomy term of country, Mapped this taxonomy in content type "Test" and also Mapped taxonomy to users account setting fields.
Trying to create view that can filter based on logged in user's country(user can belongs to more than one country) to the content's country field.

Trying with Contextual filter, but not figuring out, exactly what i need to give. Please anyone can help me in achieving this?

Or suggest me any other Better Approach


texts: Group module with advanced permissions based on taxonomy (preferrably)

texts:
I have a hard time figuring out which Drupal module to use for groups. There are quite a lot of options for Drupal 8 that provide useful functionality.
So far I have looked (at various points in time) at the following modules:

Group
Organic Groups
Taxonomy combined with Permissions by term
Workbench+Workbench Access

The last two are the ones I tried latest. Workbench Access only allows editing access permissions to be regulated, not viewing. While the Permission by term module only allows viewing content, while not really regulating editing (except that when you don't have view access you can't edit either).
I can't remember the Organic groups module very precisely anymore, but from what I (subjectively) gather from other posts/docs, the Group module is meant to be a better replacement. And that pushes me too much in a format with their groups pages and stuff.

What I am really looking for is to have roles, where each role represents a department of my organization. On the other hand we have content that I want to be able to assign to a department, but also specify whether that content should be only accessible to department members only (separately for view and edit), or potentially for all authenticated users, or even anonymous users. The access permissions should be different for each individual node, not on a content type basis. And additionally users should only be able to create content for their own department.

I got there almost with permission by term and taxonomy, where the "access level" vocabulary specifies who can access the node (and taxonomy terms that a user doesn't have access to are automatically hidden), while the "department" vocabulary determines which department a node should be listed under. Views and display suite fill in the rest.

But as I said, this doesn't allow me to control edit permissions for nodes, only view permissions. I could potentially combine this with workbench access to organize the edit permissions, but somehow this feels to me like looking for trouble with combining different permission modules.

Does anyone have a recommendation for a setup that allows me to arrange editing and viewing of nodes per "department" and on a per-node basis?


texts: Changing Twig template of form items through the theme

texts:
I have a block, which renders out a form using code that looks like this:

{{ attribute(form.facets, 'filter_' ~ filter.name) }}

I'd like to amend the markup and CSS classes for the various elements that are output, including fieldset, input, label etc. I appreciate that I can override the template files for fieldset for example, by creating a fieldset.html.twig file in my theme, but I don't want to change the markup for every fieldset element. I only want to apply my custom templates to form elements which are rendered out from a specific block.

I know that I can use a 'suggestion' (mytheme_theme_suggestions_alter) to alter the template for any element, but I can't see a way of determining if an 'input' for example, is an input within my block, or some other block on the site. Does anyone know how I'd identify this?


texts: Field variable customization in node.tpl.php

texts:
i have a website in which i am building a custom node page: node--coupon.tpl.php in which i want to render the body field only for which i used

  print render($content['body']);

The result is shown as "BODY: this is my text".

but i want to use only 'this is my text' which is entered at the time of making a new custom content type of coupon.

is it possible to do so anyhow?


texts: How to send emails to 20,000 + registered members efficiently?

texts:
I have a Drupal 7 site with about 20,000 members.  Sometimes I need to email them all at once.  Thus far, I have been adding a rules component (Condition: Make sure user has not opted out of emails, Action: Send email, translated as appropriate for each language) and then used VBO and a view to select all the users on the site.

Unfortunately, with such a large number of users, even when VBO is queued to send emails 10 at a time the batch often encounters some error every few thousand users, so I need to find which user was last e-mailed when the batch error occurred and restart the batch manually.

Is there a more robust (i.e., automatic way that will not break and require manual intervention on my part) to email all the user accounts on the site when the number of users is large?


texts:
I've spent hours trying to find good examples or working scripts, but couldn't find anything yet. What I desire to achieve: I have a sortable table with database entries in it, each row has a edit and delete link with each its own ID. So far so good. Now I have to add the functionality to actually delete/edit DB rows. Im totally lost..

Its a custom module and don't want to use other modules to achieve this, so these answers are useless : Help needed for adding and edit & delete link in a column in a view table

I also found this website

but the description is way too complicated and I think the whole script is incomplete.

I've also tried the http://drupal.org/project/examples but that didn't get me any further

does anyone have really good examples or a complete working module?

thanks for your input


texts: Commerce Address Book – need to reuse customer profile without address

texts:
In addition to the default shipping and billing addresses I have added a customer profile in Drupal Commerce, where the customer can add additional info, like email for invoices, special marking on shipped goods, comments and so forth.

This info is often the same on each order and we have recieved feedback that customers dont want to fill in these fields again and again when placing orders.

I have tried out the Address Book module and it seems to work for billing and shipping addresses, but how can I reuse info from previous customer profile that does not include an address? Maybe just skip the dropdown address field and use a previous customer profile and still have the possibility to edit the info?

Anyone that can point me in the right direction?

EDIT 1: as i am trialling and testing the address book module, I realize that the dropdown menu is empty in my added customer profile (because there is no address field). I need to be able to choose which field in the added profile that should be saved as "options" in the dropdown menu. Is this possible to accomplish in code? I am not asking for complete solutions here. Mereley is it possible? If yes, are there hooks I can use?

EDIT 2: I discovered that the dropdown menu is not empty after all... it's just the human readable value that is missing. There are several empty options values that can be selected after which the field values are populated from the corresponding saved customer profile. So my question changes again (sorry about that). How can I add human readable values from one of the fields in my customer profile?


texts: Simple ajax function to render node content in custom block

texts:
I would like to render/load a node's content in my custom block.

This block will have a button which will load/refresh the block and render the data of that node.

I am able to showup my custom block

/**
   * {@inheritdoc}
   */
  public function build() {
    $build = [
        '#theme'    =>  'notification_template',
        '#markup'    =>  'markup notification',
    ];

    $build['#cache']['max-age'] = 0;
    return $build;
  }

In module_name.module

function template_preprocess_notification_template(&$variables) {
    $user = \Drupal::currentUser();
    //my own logic
    //......
}

Above code is working fine, however I am unable to refresh this block via ajax call. I will like to load 1st node's body content in above block.


texts:
I'm using many information data on my site. I have some blocks with the main informations like address and phone numbers, but also I have some blocks with Quick Response code, geolocations (latitude, longitude) etc. There is about 15 this kind of details.

I wrote a simple module which allows me to define them in one place and save all of them as a one variable (array), so if I need any contact detail in any block template file, I just call e.g: $contact_details['qr_code'] to get it.

It's working and it is very useful, but I'm just wondering what do you think about that? Maybe I spent couple hours unnecessarily, because this kind of module already exists, or maybe I did not need any module at all, because for example: I should create a page with as many fields as I need, and then create my blocks with views?

I think many people would be intersted where to store all their contact informations and use them to build any content they need, for example blocks.

there is a small cutting of my module output:


texts:
I'm looking a bit into the Rules module and it seems to have a lot of possible uses.

However, one thing isn't really clear to me. Are Rules dependent on the current user's permissions?
For example, if a user doesn't have permission to change a certain content node, but he can do something that triggers a rule that changes that content node, will the node be changed or not?

With other words, are rules executed from "administrative" permissions or from the current user's permission?

Update: I've tested out 2 permissions. Creating a content node and editing a content node by using rules when the user doesn't have permission to do so directly. In both those cases Rules doesn't follow the current user's permission and creates/edits the node without a problem. Of course this is by no means exhaustive testing, but for simple node-related operations Rules isn't hindered by the user. (Using the latest version of Drupal and Rules)
If it ever is, I've selected the answer that bypasses the problem.


texts: Hide single menu item from users without a specific role (without 3rd party module)

texts:
I have a menu and would like to hide a specific item if the currently authenticated users doesn't have the "editor" role, which i created.

Since this is such a small thing, i would like to achieve that without the use of a 3rd party module.

update::

This is not about security, I just want to hide the item regardless of the linked node's permission. In my specific case I'm even linking to a public node and just want to hide the menu item as long as the user hasn't the "editor" role.


texts: Exposed Filters Search : remove parameters from URL

texts:
i need to create something like a landing page search block (using views exposed filters) that links to a new search page.  I have problems with my current set up and I am trying to avoid any code tweaks.

My current exposed block sends the results to a result page.  However, the parameters are passed in the URL. instead of seeing
mysite.com/results  one sees mysite.com/results?taxonomy_vocabulary_3_tid=blue.  How can configure so that the user only sees the main url.

Also, My search box is not showing up on the results page. Is there a way to configure so that the results page allows you to submit another search. I would think that would be a pretty standard set up.

Thanks!


texts: Drupal 7 - How to apply Image Styles to a User uploaded logo for a theme

texts:
I have need to be apply an Image Style setting to the logo uploaded at appearance/settings/THEME_NAME

Use Case is: The theme will be used across multiple unique instances within the organization and associated groups, each with different branding. The installation will be via an Install Profile including preset Image Styles.
The logo will need to be set by the individual installing the site.  It is a requirement that this individual will not need the skill to modify a tpl file in order to set the logo path/size or use any image editing software to modify the logo's dimensions pre upload.

... where to begin?

I suspect there are two routes:

Modify the existing logo field via page.tpl.php to use a predefined image style.
OR Add a new Image field to the Theme's settings form and calling that in page.tpl.php

Either task is pushing my Drupal ability so before I begin I thought I would ask for opinions on my assumed solutions above or better yet, actual solutions to setting image styles for the logo upload. :)

Thanks in advance,
Nick


texts: Exposed Filter Filtering on Unpublished Revision

texts:
I have a content type with a massive number of fields. The primary way this data is seen is through a view with several exposed filters (looking at the fields) which provides a list of matching records. I have installed the revisioning module in order to provide drafts.

The issue I'm running into is that the filters are looking at the most recent (unpublished) revision which doesn't match the published data.

The exact problem I'm running into:

There is a published product which is marked as energy star compliant (field on a node). The new version of this product is not energy star compliant, but it has not been released yet (unpublished revision under moderation).

When users filter for only energy star compliant products (using the exposed filter) this product is not displayed. When they do not filter the product is displayed, and it is shown as energy star compliant.

What I've tried:

I haven't made much headway. I've discovered that drupal is saving the unpublished field data in the "field_data_field_..." tables, which is what I expect the filter works off of. The published data is in the "field_revision_field_..." tables.

The node table stores the vid of the most recent revision, not the published one.

I logged all of the SQL and saving the unpublished revision updates the field_data tables and saving the published revision does not.

Deleting and creating a new revision does not fix the issue.

Creating a new published and a new unpublished revision doesn't help.

The issue occurs on multiple nodes not just one.

I cannot find any settings in views, the view, revisions, or any other location that appear relevant.

What I suspect:

I'm guessing I have interference happening between modules. There are so many modules on this site that I do not have time to trace through the code and figure out what is actually happening, and there are over 60 modules enabled. My next step would be to start disabling modules but I did not build the site and I do not have the time-budget to figure out what all of these modules do and get the site working well enough without them to test if this behavior is the same.

My linux background says that this is a permissions issue (it's always a permissions issue).

My option at this point is to write a script outside of drupal (I'm not seasoned enough to know how to do this in drupal) that goes into the database and puts the correct data in there manually from the revision table. I don't want to do this, it's a bad idea and would be hell to maintain.

Any insight into what to try next would be very helpful.


texts:
With Display Suite we can make custom view modes other then Teaser to use through out the site (in views for example). This is working fine and very nice!

However, using the custom view in a .tpl file does not work (where $teaser is confirmed to work).

Notice: Undefined variable: custom_view_mode_one in include() (line 92 of /home/dev/drupal-7.x/sites/.../node--custom-content-type.tpl.php). =>

do i need to register this in template.php even though it is already registered on the page and usable everywhere else?


texts: Output all possible items in a list field as a View?

texts: Is it possible to output all of the possible options in a list field type (of a content type) as a view?


texts: Update pathauto alias without node_load?

texts:
I want to force an update of the URL alias without loading the node.

Can this be done? If not, any lighter ways to update a Pathauto alias?


texts: How to programmatically set views format?

texts:
On install I'm trying to set my commerce_products view from table to list. Where and how do I do this? I also need to add a class to the list.

I'm a Drupal noob so if answers could be detailed that would be appreciated.


texts: How to reorder items of multi valued entity reference field alphabetically?

texts: I have a entity reference field, widget used is "Inline entity form - Multiple values". We can add multiple entries. When I have multiple values they are ordered by weights. How can I order them alphabetically ?


texts:
I'm using tb_blog theme for my website, demo site:
http://demo.themebrain.com/#blog

I want to remove the padding from left side of page without corrupting whole structure of website, I'm terrible with HTML and CSS stuff.
I want a full page expanded blog.

Also I'm open to suggestions, including totally changing my blog theme to something new which by default have a full page blog theme and it's easy to customize or tell me which CSS files to fix in tb_blog theme to make it full page blog.
Thanks


texts: Setting field values according to user input in a custom form?

texts:
i am using FAPI to create nodes through a custom form. the code below creates the nodes and assign them with a title and a body, so if i wanted static field values everything was perfect. my problem is, i want the value of $body_text to be determined by the user's input in the "order" textfield. i tried doing something like -

$body_text = $form['name'];

but that didn't work.

this is the code i'm using -

<?php
function nodeform_menu() {
  $items = array();
  $items['nodeform/form'] = array(
    'title' => t('My form'),
    'page callback' => 'nodeform_form',
    'access arguments' => array('access content'),
    'description' => t('My form'),
    'type' => MENU_CALLBACK,
  );
  return $items;
}

function nodeform_form() {
  return drupal_get_form('nodeform_my_form');

}

function nodeform_my_form($form, &$form_state) {

  $form['box'] = array(
    '#type' => 'markup',
    '#prefix' => '
',
    '#suffix' => '
',
    '#markup' => '
Initial markup for box
',
  );

    $form['order'] = array(
    '#type' => 'textfield',
    '#title' => t('My order'),
    '#default_value' => 'Products',
  );

  $form['submit'] = array(
    '#type' => 'submit',
    '#ajax' => array(
      'callback' => 'ajax_example_submit_driven_callback',
      'wrapper' => 'box',
      'name' => 'submit1',
    ),
    '#value' => t('Submit'),
  );

$body_text = $form['order'];
$node = new StdClass();
$node->type = 'page';
$node->status = 1;
$node->title = "name";
  $node->language = LANGUAGE_NONE;
  $node->body[$node->language][0]['value']   = $body_text;
  $node->language = LANGUAGE_NONE;

node_save($node);
  return $form;
}

can anyone help me understand how to do this? i tried googling and reading the FAPI guide's but couldn't figure it out... plus, this is the first time i am using FAPI so in-spite the code is working, if anyone have any insights on this code (such as coding it more properly) i would also very appreciate that.


texts: I would like to know if it is possible to set up a link on a node to open a webform and copy the url from the node where the link sits to a field in the webform when it opens. If not, maybe copy some text in the link to the webform?


texts: How to remove selected topics from aggregator feed?

texts: In my Drupal feed aggregator generating a separate website feed into my website. However, my client dislike some topics on that feed therefore, is it possible to remove selected topic from that feed ?


texts:
I have an taxonomy and an view that displays it.

This view has default sorting by Taxonomy term: Weight (increasingly). I would like to add, as second criteria (when the weights are equal) the date when taxonomy term has been added.

Unfortunately on the list under criteria -> add I cannot see anything date-related:

Where should I find the date of term has been created?


texts: Form altered select field is submitting the wrong values

texts:
I created a content type in a module called travel_page.

In Drupal, I added a new empty List(text) field called English_side_menu

Now I want to populate the List text dynamically.

I did:

/**
 * Implements hook_form_alter().
 */
function travel_page_form_alter(&$form, $form_state, $form_id) {

  // $english_side_menu_list has been initialed here

  $form['field_english_side_menu']['und']['#options'] = $english_side_menu_list;
  dpm( $form['field_english_side_menu']);

}

Every thing is working fine, except the value that appears for the select once I submit the button, is the rank of the selection instead of the text selected.

Do you have an idea what is wrong in the code?

Thanks.


texts:
I am using this solution to print the image for a node in the html.tpl.php file. This works, except it has the full markup. I need just the url for the image. Any ideas of how to print this out?

For instance, I am using this:

 if ($node = menu_get_object() ) {
  if ($node && isset($node->nid)) {
    $node = node_load($node->nid);
    node_build_content($node);
    $variables['field_image'] = render($node->content['field_image']);
     }
   }


texts: Type-specific fields for different categories of content type

texts:
I have a contract content type on my Drupal 8 site, and I would like to use the same content type for multiple different types of contracts.

95% of the fields are common for all types (contact information, prices etc.), but there are some fields specific to a contract type.

I was going to do this simply by having a field indicating the contract type, and then using form alter etc. to hide/disable fields, and set other fields required where necessary.

I'm sure there's a much better way to do this.. What would be the best approach here?


texts: How and where to create a prefix key for memcache?

texts:
I am up to here in drupal documentation :

  Start at least one instance of memcached on your server.
  Edit settings.php to make memcache the default cache class, for example:
    $conf['cache_backends'][] = 'sites/all/modules/contrib/memcache/memcache.inc';
    $conf['cache_default_class'] = 'MemCacheDrupal';
    $conf['memcache_key_prefix'] = 'something_unique';

Why do I need a memcache key prefix if have only one database? Anyway where and how do I set it?


texts:
I'm creating a view that displays a few fields from a specific content type. Among the fields is the trimmed nody body. The problem is that the HTML tags in the body are escaped and are visible as source in the view.

So instead of

  Lorem ipsum dolor sit amet, in dolores propriae sapientem vim. Per no
  autem minimum iudicabit, ad numquam eloquentiam ius. Quas iusto ea
  vis. Mea quaestio gloriatur mediocritatem et. Mei rebum postea ne, his
  malorum necessitatibus ei. Ea pro animal mandamus, ad pri postea
  eripuit.

I get the following:

Lorem ipsum dolor sit amet, in dolores propriae sapientem
  vim. Per no autem minimum iudicabit, ad numquam eloquentiam ius. Quas
  iusto ea vis. Mea quaestio gloriatur mediocritatem et. Mei rebum
  postea ne, his malorum necessitatibus ei. Ea pro animal mandamus, ad
  pri postea eripuit.

From what I understand Drupal 8 escapes everything by default, so I suspect this has something to do with my problem. I looked at every setting I could find in Views, but I couldn't find anything that would change the escaping of HTML tags.

How can I output the body of a node unescaped in a Drupal 8 view?


texts: Fix/force blocks in a region inside a tableDrag

texts:
I'm trying to alter/patch/hack node_level_blocks (like the admin blocks overview page) so that some users are restricted in choosing regions for certain blocks. For instance the "New Content" view must always be in the Right region. The normal user can change the weight and add more blocks to that region, but they can't remove that block from that region.

What I did (I'm pretty close):

Form alter the <select> to that it contains only 1 option
Override Drupal.tableDrag.blocks.onDrag to fix and improve the standard tableDrag handler and make the row jump back to its forced position

That works, but the user can still drag the block around to regions it doesn't belong. (I don't have a demo online.)

How do I tell tableDrag to NOT let some blocks out of their original regions? I don't understand its 400 options...


texts:
I have created a custom page in Drupal 6 and named it page-node-1.tpl.php.
I want to create a panel drag and drop on this page. But when I create a panel it will assign a different name to the panel page. How can I create a panel page for my page-node-1.tpl.php?

I'm new to Drupal, thanks in advance.


texts: Drupal is not saving any changes made through administrator, Drush works fine

texts:
I just began working for a company and am using Drupal for first time.  I'm working locally on WAMP.  I started by installing and configuring a few modules before making my own and everything worked fine.  Then I needed to integrate it into the site.  I downloaded the repositories and all dependency modules/themes needed, as well as exported from the server and imported into my machine the database Drupal was running on. That got the correct look/feel/content of the site.  However, since then I have been unable to make any changes through the administrative menu/pages.  I can't enable/disable modules, make configuration changes, etc.  Here's where my troubleshooting starts:

I can enable/disable modules through Drush.
I've verified my Drupal settings.php file has the correct database settings for the imported database.
I've verified I can log into our dev server and edit things there.
I've verified the user priviledges and roles databases transfered correctly.
I've used Drush to add the "Superuser" role to myself.
I've used Drush to log on as the root user.
Since I can't change configuration of a module, I can't enable debugging through Devel.

I've spent hours trying things and searching online, and I'm out of ideas.  The closest I've seen someone else post about is this:

Can't save settings after copying site to new server

However, the symptoms aren't a 100% match, as I can log out/in.  Any recommendations would be appreciated.


texts: Create a tableselect like /admin/people/permissions

texts:
I want to create a table that looks like the drupal table on : /admin/people/permissions (table with multiple checkboxes on every line)

Any help is welecome


texts: How do I change the machine name of a field once it's been created

texts:
I spaced out while typing the field name an now the machine name is not what I wanted it to be. I know it's just an annoyance. but I'm wondering if there is some way to alter the machine name of a field once it is created.

I suppose this leads me into the second part of my question. if I created a field, and it is no longer being used, how do I go about deleting it, does this have to be done from the database, or can it be done somewhere in the UI.


texts:
I'm looking for a file field module that will allow me to select files from an AWS S3 Bucket, but not upload them.

A client of mine is going to be uploading csv files via ftp from a different location and he wants users of a lesser role to be able to select the files from within the website.

I know that Scald will probably serve those needs, but not without a lot of setup and headaches.

Anyone know of a way to accomplish this?


texts: How to make filterable taxonomy for an eCommerce site?

texts:
I am trying to achieve a "filterable" style of categories for a Drupal 7/UberCart website. So you click on categories and rather than them going to that category it instead narrows down the result. Then you can also click on a category again to remove it and widen the search.

I've sort of got half-way there using the built-in Views but I can't manage to make it display as functional links. I have tried the "Better Exposed Filters" module but it makes it a one-way street (can narrow the search but not widen) and produces some ugly URLs.

Is there a way to achieve what I am trying to do? Maybe by using some sort of jQuery to override the default select box behaviour?

Thanks


texts: Adding a query string to a link in Views

texts:
I've added an "Add Comment Link" to a View and I'm wondering how I would go about adding a custom query string to the generated URL?

I'd guess I need to do something under "Rewrite Results", either with "Rewrite the output of this field" or "Output this field as a link" but I only seem to have an option to include the fully rendered link as a replacement token.

Is there a way (without resorting to regex) to get the URL from the link so I can rewrite the output myself? Or is there an easier way to add the query string?

Thanks


texts: How to put links in a menu programmatically?

texts:
I'm using Drupal 7, and modules such as Service links and Flag.

I would like to put the links proposed by these modules (share or flag) in a menu (main menu or other).

Anybody know the way to follow?


texts: Message - Item already in cart (commerce)

texts:
I want to disable the ability of adding a product twice to the shopping cart.

Is there a way to prevent or prompt a message when a user tries to add the same product twice?


texts:
I wondering how to access to session in twig ?

In my Controller I have this part of code :

   $tempstore = \Drupal::service('user.private_tempstore')->get('mdm_user');
   $tempstore->set('num_donateur', $num_donateur);

I tried to display the session in my twig template :

  {% set mdm_session = app.session.get('mdm_user') %}
  {{ dump(mdm_session) }}

But nothing is displayed. Even session is inaccessible.

  {{ dump(session) }}

Any help would be appreciated.


texts: List nodes from a taxonomy based on a field

texts:
I'm looking for the most "Drupal" way to create either a view/block (not sure about either) that contains a list with the top level items being the parent taxonomies from a certain vocabulary (4 parents in total), and then nested under each taxonomy, the first 5 products that have a certain field on them set to true.

Essentially a "featured products"-esque block that will have 4 tabs.


texts: How to build a workflow with content type tasks using Maestro

texts:
We are currently trying to build a workflowsystem using the Maestro module.
Let's assume this:
User A edits Task 1, enters a installation wish date
User B edits following Task 2, sees (readonly) the wish date,
enters the installation execution date. And so on, many other fields.
Each task owner shall only edit/see the fields meant for him.
I cannot figure out how to connect the content type data properly.
Either we use ONE content type for all tasks, how can we filter
the needed fields in the task form, or - when we use a separated content type per task, how do we connect the instances of the content type.
This seems must-have and basic for us, but i can find no example
in the documentation. Any out there is trying to do this as well ?
If someone is able to do the same with Webform task, i'm open for everything ...


texts: How to Disable new terms (free tagging) with Taxonomies?

texts:
I have a "term reference" field, in a form that uses an auto-complete widget.
I want to limit user input to terms in the vocabulary only, and output a message when a user tries to enter a non existing term.

I found the Content taxonomy module. However this does not work with forms that contain a field collection or a field group.

There is also a contributed patch 1078878-DisableAutoCreation-D7-UTF-8.patch. But I was wondering whether there was a simpler/cleaner solution like a module or maybe I missed an already existing way of doing it with latest drupal and taxonomy versions.


texts:
I try to include a simple script (below) and cant get it to work.

(function ($) {
  Drupal.behaviors.myModuleBehavior = function (context) {
    alert('say something pretty please');
  }
})(jQuery);

The script is added within a hook_form_alter function

drupal_add_js(drupal_get_path('module', 'my_module') . '/js/my_module_form.js', 'file');

Up to here, no issues. I see the script is added to the long line of js:extends with the correct path. Thus I would expect to receive an alert... but nothing happens.

As I've run out of things to check for and consulted docs, google and this site, only to find that the code should work, is anyone able to point out what might be wrong here?


texts: How to put the autocomplete widget type in my field?

texts:
i'm new in Drupal and i'm trying to create a field type taxonomy_reference, but i been looking the way to put the widget autocomplete for the field but It doesn't seem to work. This is the code that i'm using to create the field:

 $field = array(
    'field_name' => 'new_keyword',
    'type' => 'taxonomy_term_reference',

          );

  field_create_field($field);

 $instance = array(
    'field_name' => 'new_keyword',
    'entity_type' => 'node',
    'bundle' => 'specimen',
    'label'=> 'Keywords',

  );
  field_create_instance($instance);

Where should I put the widget type? Thank you.


texts:
I created on custom module to generate a form with this code

function report_page_form_form($form, &$form_state) {
    $meberArr = array();
    $form['field_member_org']=array(
        '#type'=>'select',
        '#options'=> $meberArr,
    );
    $form['field_start_date'] = array(
      '#date_format' => 'Y-m-d',
      '#type' => 'date_popup',
      '#weight'=>0,
    );
    $form['field_end_date'] = array(
      '#date_format' => 'Y-m-d',
      '#type' => 'date_popup',
      '#weight'=>0,
    );
// Provide a submit button.
          $form['submit'] = array(
            '#type' => 'submit',
            '#value' => 'Filter',
          );
return $form;
 }

In one of my node--nid.tpl.php, I am rendering this form as

 $arr = drupal_get_form('report_page_form_form');
 print drupal_render($arr);

I am writing an SQL query in the same node--nid.tpl.php file to fetch data from DB.

SELECT TITLE FROM REPORT WHERE ....

I need to pass form submitted values to this query. Can anyone help me to do it.


texts: How can I make Drupal/MySql accept special characters in ANSI (without changing the file's encoding)?

texts:
I'm developing a custom module where a user (actually an admin of sorts) can upload a  CSV file. Based on the contents of this file, certain rows are inserted into a table.

I'm now having problems with special characters, like é. These give the following error:

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xE9initi...' for column 'remarks' at row 1

I've tried changing the collation of the table and of the specific field, but this didn't help. The only thing that did help is changing the encoding of the file. But this puts the burden of solving the problem in the hands of the (non-technical) admin. Something I don't want.

What's more, this used to work. Before this module, things were done with a (non-Drupal) php script. The difference is that the old php script used mysql_query to insert the records, whereas I am now using db_insert.

How can I make Drupal/MySql accept the special characters in ANSI?


texts: cannot create taxonomy terms using hook_enable solved!

texts:
i want to create 1 taxonomy vocabulary and 1 taxonomy term using drupal's hook_enable. but when i enable the custom module, it create only the taxonomy vocabulary. And if i disable and enable the module, the taxonomy term will be created without problem. the code is as below:

 $sql = "SELECT vid FROM {taxonomy_vocabulary} WHERE machine_name='article_type'";

$vid = db_query($sql)->fetchField();
    if (!$vid) {
      drupal_set_message(t("Created article type vocabulary"));
      // No vocabulary exists, we'll create one.
      $vocab = (object) array(
          'name' => 'article type',
          'description' => t('Automatically created by the custom_block module'),
          'machine_name' => 'article_type',
          'multiple' => '0',
          'required' => '0',
          'hierarchy' => '1',
          'relations' => '0',
          'module' => 'custom_block',
      );
      taxonomy_vocabulary_save($vocab);
      $vid = $vocab->vid

}

  $terms = (object) array (
          'name' => 'News',
          'vid' => $vid,
          'vocabulary_machine_name' => 'article_type',);

 $term_name = $terms -> name;

  $tid = db_query("SELECT tid FROM {taxonomy_term_data} WHERE vid = :vid and name = :name", array(
    ':vid' => $vid,
    ':name' => $term_name,
  ))->fetchField();

if ($vid && !$tid) {

    taxonomy_term_save($terms);
}

}

PS:i've figured it out! it's a stupid mistake. i did not get the vid after saving the vocabulary to the database. i just need to add $vid = $vocab->vid after taxonomy_term_save.


texts: PDOException when creating the table: Base table or view not found

texts:
I have Drupal running on MariaDB 5.5.33. When I run update.php (after upgrade to Drupal 7.28 from Drupal 6) I get an error:

  Failed: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webdb.location_country' doesn't exist: CREATE TABLE {location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter ISO Country Code', name VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Full Country Name ', PRIMARY KEY (code) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Country data managed by location.module.'; Array ( ) indb_create_table() (line 2720 of /home/web/public_html/includes/database/database.inc).

When I try to run command

  CREATE TABLE {location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter ISO Country Code', name VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Full Country Name ', PRIMARY KEY (code) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Country data managed by location.module.';

in phpMyAdmin I get an error

  #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '{location_country} ( code CHAR(2) NOT NULL COMMENT 'Primary Key: Two letter IS' at line 1

But I wasn't able to find out where is the problem.


texts: Mollom captch disappear after using hook form alter for validation

texts:
I have altered Request new password form  field label

function useredit_form_user_pass_alter(&$form, &$form_state, $form_id) {
  $form['name']['#title']='Username';
  $form['#validate'] = array('useredit_user_pass_validation');
}

function useredit_user_pass_validation($form, &$form_state) {

  $name = trim($form_state['values']['name']);
  if(preg_match("/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/",$name))
  {
     form_set_error('parent_field_email', t('Please enter valid username.'));
  }
  # try to load by name.
  $users = user_load_multiple(array(), array('name' => $name, 'status' => '1'));
  $account = reset($users);

  if (isset($account->uid)) {
    form_set_value(array('#parents' => array('account')), $account, $form_state);
  }else{
    form_set_error('name', t('Sorry, %name is not recognized as a user name.', array('%name' => $name)));
  }
  }

form get's altered and validation works but captch image gets disappear. How to resolve this ?


texts: Create a module to get taxonomy terms list

texts: Can someone please explain to me how i can to retrieve the taxonomy terms of a specific vocabulary step by step ? i saw many answers and code but since i'm new to drupal i don't know where the code should be in the module that i created to retrieve the taxonomy terms.


texts:
I'm in search of a module (or technique) to keep track of the software/release version that a Drupal installation is running. I am not talking about the Drupal version running the site (e.g 7.12) but of the implemented site itself, exactly like any Stack Exchange site does on the footer (currently: rev 2012.4.5.2127).

I need a structured way to keep track of this data (so a plain text block on the footer will not do) because I'll need to access this information from other systems as well.

Currently I've solved it by using a persistent variable that I handle with Drush.

# Set it.
drush vset --always-set release "1.0.4"

# Get it.
drush vget release

Is there another (probably better) way of handling this?


texts: Override Views Contextual Filter in View Exposed Form Validation

texts: I'm using the Content:Nid contextual filter in my view (with exposed filters) and would like to dynamically set the value of this contextual filter from the exposed form validation callback. Is this possible?


texts:
Upon running
drush pm-list --type=module --status=enabled | sed '/\((.*)\)/!d;/[Cc]ore.*-.*[Rr]equired/d;s/.*(\(.*\)).*/\1/' | sort > noncoremod.txt

I got this error:

The following extensions will be disabled:
.........
Do you really want to continue? (y/n): y
array_merge(): Argument #2 is not an array content.install:42        [warning]
array_merge(): Argument #2 is not an array content.install:42        [warning]
array_merge(): Argument #2 is not an array content.install:42        [warning]
array_merge(): Argument #2 is not an array content.install:42        [warning]
.........                                                            [warning]
Table &#039;profile_fields&#039; already exists                      [warning]
query: CREATE TABLE profile_fields (
`fid` INT NOT NULL auto_increment,
`title` VARCHAR(255) DEFAULT NULL,
`name` VARCHAR(128) NOT NULL DEFAULT &#039;&#039;,
`explanation` TEXT DEFAULT NULL,
`category` VARCHAR(255) DEFAULT NULL,
`page` VARCHAR(255) DEFAULT NULL,
`type` VARCHAR(128) DEFAULT NULL,
`weight` TINYINT NOT NULL DEFAULT 0,
`required` TINYINT NOT NULL DEFAULT 0,
`register` TINYINT NOT NULL DEFAULT 0,
`visibility` TINYINT NOT NULL DEFAULT 0,
`autocomplete` TINYINT NOT NULL DEFAULT 0,
`options` TEXT DEFAULT NULL,
PRIMARY KEY (fid),
UNIQUE KEY name (name),
INDEX category (category)
) /*!40100 DEFAULT CHARACTER SET utf8 */ database.mysqli.inc:169
Table &#039;profile_values&#039; already exists                      [warning]
query: CREATE TABLE profile_values (
`fid` INT unsigned NOT NULL DEFAULT 0,
`uid` INT unsigned NOT NULL DEFAULT 0,
`value` TEXT DEFAULT NULL,
PRIMARY KEY (uid, fid),
INDEX fid (fid)
) /*!40100 DEFAULT CHARACTER SET utf8 */ database.mysqli.inc:169

array_merge(): Argument #2 is not an array content.install:42        [warning]
array_merge(): Argument #2 is not an array content.install:42        [warning]
array_merge(): Argument #2 is not an array content.install:42        [warning]
array_merge(): Argument #2 is not an array content.install:42        [warning]
.........                                                            [warning]
There was a problem disabling                                        [error]
comment,contact,help,locale,menu,path, .....

After that I go to admin/build/modules to check the modules state but I was being surprised by seeing that all the modules are enabled.

Any thoughts?

Related issue: http://drupal.org/node/523384


texts:
After two days of researching and experiment, I was finally able to make a time range field here.

However, now my client wants the end value to be optional. I saw this article that uses a field type to make the value optional, but I would prefer to just use my widget. Would this be possible?

Thanks.


texts: How to build a url path from raw path and arguments?

texts:
In Drupal 7, from within a module,

My goal is having a menu path (e.g. "/path/to/page/%/%/view/%") and an array of arguments (e.g. array('foo1', 'foo2', 'foo3')), be able to build the resulting path (e.g. "/path/to/page/foo1/foo2/view/foo3").

After looking all over in the Drupal API, I cannot find a function that would do that.

Does such function exist?

EDIT:

The placeholders can be different as well. e.g. "/path/to/page/%user/%blah/view/%". The original raw path is dynamic and is only known during runtime.

I thought that format_string may work for %user and %blah, but what about the % in the end, does format_string work to replace that one too?


texts: Add restriction to content on the basis of various User

texts:
I am new in drupal, So I want to know how can I restrict my content in content listing according to various users. e.g. I have four contents named A,B,C,D. Now I want Customer1 to see and edit only content A and B. While Customer2 can do the same with C and D only.
I've done my research and read about "form_node_admin_content_alter" but not sure how it works. So kindly provide me an efficient solution for this.

Thank you


texts: Programmatically add more than one taxonomy term in Drupal 7

texts:
Just a quick question. I'm creating a node and adding a term to the node like this:

 $newNode->field_tags[$newNode->language][]['tid'] = "a digit here";

Fine, but how do I add more than one term per node? I've tried a comma-separated string of digits and an array of digits but neither work.


texts: Can I set up Paypal recurring payments on Commerce Kickstart?

texts:
Like the title suggests,
I am using Paypal for provide an apparent 'Trustworthy' service to my customers.
I offer a flat-price cleaning service.
I would like to offer a weekly, fortnightly and monthly service to my current 'products' at different discount rates on the original product.
can someone help me perform this?


texts:
When I add an @mainpage block to a .module file this file doesn't validate when I run phpcs.

I always get

ERROR   | [ ] Missing short description in doc comment

Does anybody know how to fix this?

Edit: Code example:

/**
 * @mainpage
 * Foobar module, provides foo functionality.
 *
 * Topics:
 * - @link foobar_menu Generates the admin menu for this module @endlink
 *
 * The foobar module fetches data from a webservice, no data is held in Drupal.
 */

/**
 * Implements hook_menu().
 */
function foobar_menu() {
  // Do stuff.
}

Thanks!


texts:
I have a view that lists all the orders. I want an action/operations column in the view which has buttons/links for eg: edit, repeat, delete, upload, download, reset, print. I cannot find a way to include a custom column in my view.

Current "Operations links" Columns shows me some menus which are added by default. Can I change them or can i add another column with my own choice of buttons/links ?


texts: I cannot upload an image - 404 ajax error

texts:
When I try to upload an image, image is not generating and I always get ajax error.

I cannot upload an image.

I get a 404 ajax error.

I use Drupal 8.54

php.ini:

memory_limit = 254M
upload_max_filesize = 20M
post_max_size = 20M
max_execution_time = 90

No error - Recent log messages.

The files directory ( sites/default/files ) permissions - 777

I don't find any solution or references about that.

Edit:

I can't upload file.

When I want to upload more than 8KB files, get ajax error.


texts: add ajax form-like functionality inside node

texts:
I have an article on my Drupal site and need to add some calculations to it (to better illustrate a topic). It means, three textfield inputs and a button, after clicking the button a calculation should take place on server side (not in javascript, because I want this calculation to be in php on server side) and then comments should be displayed below the textfields.

The problem is, I would like to have all of it inside node, not below it - for better user experience.

Inserting input and submit button via wysiwyg works fine. Then, I need to use raw jquery ajax command and do everything manually - it should be possible.

So before doing this, I'd like to ask if there is a simpler way?

E.g. ajaxifying webform is documented. So, if the whole webform could be treated as one token, it could be inserted into wysiwyg using token filter inside node content. But webform as a token? - can't find such solution.


texts: How do I get the roles of the currently logged-in user?

texts:
In Drupal 8 I would use the following code.
$current_user = \Drupal::currentUser();
$roles = $current_user->getRoles();

What is the equivalent code I should use in Drupal 7?


texts: Custom Twig Template for Custom Content Type

texts:
In my custom modules I am creating a custom content type. I also need to apply a twig template for this custom content type, but I can't seem to get it to actually apply.

in myModule.module file I have:

function myModule_theme($existing, $type, $theme, $path) {

return [
    'faculty_bio_node' => [
      'variables' => [],
    ]
  ];
}

and I have a custom twig template named :   faculty_bio-node.html.twig

The content types machine name is faculty_bio


texts: Is there a way to add a Tour on all the pages/routes?

texts: I need to create a Tour guide for the generic elements in a page like Search bar, notification, sidebar. These elements appear on all the pages. I want to create a tour which is available on all the pages. The tour is being created using Tour UI module. Is there a way to create a Tour for all the routes available. Most of the pages are Landing page nodes and few view pages.


texts: How to export custom user fields configuration?

texts:
I'm developing a module and it needs some custom fields on the users table.

If I export the whole config yml zip, the field.field.xxx and field.storage.xxx files for my custom fields are there, but since "users" isn't a custom content type of my module, those fields are not added to the users table during module installation.

How do I add those fields to the users table during module installation?


texts: Imagecache custom action: scale image to width defined by other field

texts: I would like to define a custom image style with imagecache_actions module, where the image is scaled to a width (in pixels) given by a interger field in the same node. How is this accomplished?


texts: How can I show just one content with 5 images

texts:
I create search page with views in Drupal 8.

In filter criteria, I choose "Content: images:target_id" because I want show contents that have images. (I set operator to not empty.) If a node has 5 images, the search page show that node for 5 times.

How can I fix this problem?


texts: View the original price, the discounted price and the discount percentage

texts:
I am currently working on a newsletter and I want to display the prices of my products there. How to recover the original price, discounted prices and the discount percentage. I wish to put three different value to place my letter and apply a different style.

With this line print render($content['product:commerce_price']);
it displays the three values. But I would separate them.

So what line of code do I type to get the original price, then to get the discounted price and then to get the discount percentage?
here is a product page of my site enter link description here

thank you


texts: Import issue in other languages using csv file to drupal node creations

texts:
I am trying to import a csv file using parsecsv-for-php library.The given csv file is in Catalan language.

The thing is that when i just try to create nodes with given csv data it is throwing me this error like this while importing PDOException: in field_sql_storage_field_storage_write() (line 448 of /modules/field/modules/field_sql_storage/field_sql_storage.module).

To resolve this issue, what i did is that used utf8_encode function for each fields and avoided that error.

After successfully importing, the issue over here is that, this is the body text in csv

Thomas Alva Edison va anunciar la invenció del fonògraf l’any 1877, fent una demostració aquest mateix any. L’any 1878 el va patentar als Estats Units. Inicialment per enregistrar va fer servir cilindres de cartró recoberts d’estany, per finalment utilitzar cilindres de cera sòlida. Aquests van ser comercialitzats l’any 1889. La competència amb els discos sonors va acabar per eliminar els cilindres de cera cap els anys 1920s. Tot i així van sobreviure uns anys més com a suports d’enregistrament a oficines amb el dictàfon.

and the imported body text in the drupal i have displayed as image

If u compare both u will know there are certain differences in the body text such as

l`any in csv body text is getting imported in drupal as lany

d`estany is getting imported in drupal as destany

d`enregistrament is getting imported in drupal as denregistrament

I just want the same text to imported in drupal too with out missing any symbols or special characters. what am i doing wrong.

I have attached the my uploaded csv file formats too.

Only this character(') is not coming up properly in drupal.Any help on this is really appreciated.Thanks in advance


texts:
I'm trying to make a record of different user profiles.
And each of them, possess or display different items, apart from those who normally come (Username, Email, Photo, etc..). Something like:

Profile of Visitors         ==>>>> Only Images / Photo
Employee Profile            ==>>>> Birth Date,  Curriculum Vitae, etc.
Artist Profile,             ==>>>> Albums of: Videos, Music, and / or Photos
Business Profile            ==>>>>Photo Albums / Images.

And each user is able to handle each of these elements.

E.g.:
- If I am a musician, update my music files or Albunes Photo.
- If employed Update My Currillo vitae. And so on ...

It will be possible to do this with Drupal 7?. Please Any suggestions?

Best Regards


texts: How do entity reference fields that reference the same entity avoid an endless chain of references?

texts:
We are using an multi-valued entity reference that references entities from the same Entity type. For example We have a Product Variation Type with an entity reference field on it, which references other entities from the same Product Variation Type.
In an orderPresaveEvent We are checking for the field and that it is not empty:
$product_variation = $order_item->getPurchasedEntity();

  //check if FIELD_NAME exists and is not empty
  if ($product_variation->hasField('FIELD_NAME') && !$product_variation->get('FIELD_NAME')->isEmpty()) {

Then we are creating storage data for the $child_variations by getting the referenced entities from the $product_variation that has the field, and isn't empty:
foreach ($product_variation->get('FIELD_NAME')->referencedEntities() as $child_variation) {

The problem I am having is that if Product A references Product B, and then Product B in it's own context references Product C, our first add to cart is successful in getting only Product A and Product B, but subsequent add to carts or updates are getting the chain of children (grabbing Product C because it is referenced by Product B etc)
There might be something in the our storage data logic that is affecting this, but I would like to learn if my current logic correct. Does this method restrict the entity reference so that only the parent and it's immediate children on that particular field are analyzed? In my mind, it seems like I am analyzing the children of the parent, and also all the children that belong to children, since they are all purchasable entities that have the field and are not empty...
So how do I restrict the logic from grabbing other children referenced by the child? It seems like there needs to be some sort of depth restriction, but I am new to PHP and EventSubscribers, so I am not sure what logic is available.

As potential workarounds, there is a patch and a module that restrict the end user from chain referencing, which I might also incorporate, but I would like my logic in the module to handle things correctly regardless.


texts: Is it possible to use menu tabs/default menu tabs available in Views, along with ajax, so that hitting a tab does not load a new page?


texts:
I have a few pages such as a general "contact us" page. I'd like this page to exist inside of the Main Menu but be able to be linked from other menus (Theatre menu, for example). I create the contact us page and assign it to the Main menu on the node's form. Then, I add the link from the Theatre menu.

However, the contact us page now shows the Theatre menu.

How do I accomplish linking a page from multiple menus but keeping it inside of it's own menu?

I thought the old convention was to add existing links such as http:/learn/contact_us. If I add the link learn/contact_us to Theatre's menu, the Contact us page now shows the Theatre menu (instead of the Main menu).

Additional folks running across this problem:
https://drupal.org/node/1314742


texts: How to use flags to record and show 'visited this place' by users on a node type 'destination' in a tourist site?

texts:
This is about the Flag module.

How can I show under respective node, the count of those users who visited that place(node type is a destination, which acn be flagged as visted/not-visited). Going further, the count should be a link leading to list of users who have visited it.

I have views and flags ready on my install.


texts: how to install drush on mac getting error can't connect to local mysql

texts:
I'm trying to install drush on my local macbook.
Drupal runs fine but when I try to run drush from cli:

jackBook:drupal-7 jack$ drush status

I'm getting the following response in the cli:

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000] [2002] Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/Applications/MAMP/tmp/mysql/mysql.sock&amp;#039; (2) in drupal_is_denied() (line 1847 of /Users/jack/Sites/drupal-7/includes/bootstrap.inc).

Additional

PDOException: SQLSTATE[HY000] [2002] Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/Applications/MAMP/tmp/mysql/mysql.sock&amp;#039; (2) in system_list() (line 165 of /Users/jack/Sites/drupal-7/includes/module.inc).

Drush command terminated abnormally due to an unrecoverable error.

what did I do wrong?

I followed these steps:
http://drupal.org/node/508450#comment-2352240

Download drush.tar.gz to your desktop (or wherever)
Jump across to the Terminal
cd ~/Desktop
Extract it with
tar -zxf drush.tar.gz
Move it to /usr/local/lib
sudo mv drush /usr/local/lib/
Make it executable
sudo chmod u+x /usr/local/lib/drush/drush
Then stick it in /usr/bin/ so that you can run it from anywhere
sudo ln -s /usr/local/lib/drush/drush /usr/bin/drush

And added alias drush='/path/to/drush/drush' to my .profile

phpinfo file:

jackBook:php jack$ php -i

phpinfo

as you can see pdo is enabled for mysql / mysqllite (if that is somewhat related and I'm not wrong )


texts: How do I add the author's image in a view?

texts:
I want to add the player's photo shown in the user profile, in a view that shows the following data.

The view shows a list of nodes. The "Player Name" field shows the author of the node.

How can I achieve this?


texts: How to add a single taxonomy term as a body class in Drupal 8

texts:
I'd like to add a single taxonomy term into the body tag as a class in drupal 8 - so I page styles can be controlled easily.
I have tried (path and ID as class in body How can I dynamically add URL or taxonomy to body class and https://www.drupal.org/node/2634364) which only get me part way there, taxonomy term would provide a future proofed solution.


texts: Possible to get a render array from a loaded entity without calling ->getViewBuilder()->view()?

texts:
I'm working on the performance of a code block that contains 3 lines that are the main contributors to latency:

A paragraph library item is loaded from the DB
A paragraph is loaded
from the DB using library items reference
The above paragraphs render
array is generated from ->getViewBuilder()->view()

I originally figured it was these loads from the DB that were the biggest culprits, but it turns out that ->getViewBuilder()->view() is.
When I have a loaded entity, is it possible to get its render array from it without calling ->getViewBuilder()->view()? Alternatively, can I get a render array from just an entity ID without first loading it?


texts: Images not displaying on site (or in view source) after uploading them with ckeditor

texts:
I've manually added the filtered Html option because it wasn't there with my drupal 7 installation. In the editor view I get the upload image option etc, and I am able to browse and insert images. However, after hitting save, the images aren't displayed on the site.

I am using IMCE file uploader.

What am I doing wrong?


texts:
Watchdog table has become so big that, truncate cascade or delete command in the table is not working at all.
The moment the server encounter a DELETE command in watchdog, it gets busy in executing that, all resources are being occupied by DELETE command and server gets very slow. The total functionality can be considered to be null.

Even vacuum full/ananlyze is yielding any result even after waiting for 1 or 2days.


texts:
I am using the views module to show a block of 4 projects on my homepage.
This view uses node--project.tpl.php to show a project in this view.

What i now want to do is assign a class in node--project.tpl.php to my node which depends on an iterator. This iterator should match the row iterator around it. (The row iterator always assigns a class to the row around the node. ex. views-row-1, views-row-2, views-row-3 .. and so on.)

What i want to is: node 1 should get the class 'grid-1-4', node 2 and node 3 should get the class 'grid-1-8'. node 4 should get the class 'grid-1-2'. By these nodes i mean the nodes from my views block result.

Is there a way to pass by this iterator (i think it comes from sites/all/modules/views/theme/views-view-unformatted.tpl.php) to my rendered nodes? Or is there another way to iterate through my view which could solve my problem?


texts: How to get the number of items in a user's cart from commerce?

texts:
I've been looking into the drupal 8 commerce module, I want to take the variable $count that is generated within

  ../commerce/modules/cart/src/plugin/block/CartBlock.php

and place it into a custom block in my own theme. I see that the build() function returns the count variable through #count which can then be accessed via twig. Just for reference Drupal commerce currently uses the template:

  ../commerce/modules/cart/templates/commerce-cart-block.html.twig

to output the variables and markup:

      {{ icon }}
      {{ count_text }}

  {% if content %}

        {{ content }}

        {{ links }}

  {% endif %}

My question is, how I can I make that variable global, are there any implications to just making it global, like what if the user updates the basket?

How do I go about achieving this? Does anyone have a possible solution?


texts: Custom url is not working with drealty listing

texts:
I am using Drealty module in Drupal 7. I have created custom url for properties.

I am getting path using;

<a href="<?php print drupal_get_path_alias("drealty_listing/$id"); ?>"><?php print t('More Detail'); ?>

This code is not working for me properly. For some properties it gives page not found but Property exists.


texts: How can I create a D7 View that groups and aggregates a "Rendered Node" field by date, grouping multiple instances for each grouped date?

texts:
I'm creating an event calendar and have run into this challenge. Say I have these events:

Concert A:
1/5/2016
1/6/2016
1/8/2016

Concert B:
1/6/2016
1/7/2016
1/8/2016

I want my view to display like this:

1/5/2016
Concert A

1/6/2016
Concert A
Concert B

1/7/2016
Concert B

1/8/2016
Concert A
Concert B

Right now I have a view which only shows the first instance of an event by date, and groups/aggregates distinct instances by date. Using the above data, this is my view now:

1/5/2016
Concert A

1/6/2016
Concert B

I'm currently grouping by a Date field which is set not to display. A second "Rendered Node" field displays the node using a view mode. This is driving me nuts. Anyone pull this off before?


texts: Block feed importer to create a new term in taxonomy

texts:
I am using feed importer to bulk import the nodes in a drupal site. I have created a custom content type named Product. This content type has CCK fields which are linked with a taxonomy.

I am using CSV files to import the data. If I put a different(invalid) value in one of the field and that is not present in the vocabulary(term in the taxonomy), it creates a new term.

I want to block the creation of the new taxonomy term as it might create some invalid term in my site.


texts: Composer generated installation can't be completely cloned

texts: I have a Drupal 8 installation where I removed all Composer generated folders from the root .gitignore, so that I can make a complete clone of the installation. The problem is that module folders which contain a .git folder themselves remain empty in the cloned folder. What am I missing?


texts:
I am currently using the Rules module along with workbench to determine when to send an email and this is working fine.
The problem is now the client wants to in addition to sending email to the "To:" (which is working fine) and also to the "CC:" section which does not seem to be configurable with the Rules since they only have a "To:" section and not a "CC:".
Can I still use Rules to send "CC:" emails or am I going to have to do everything as a custom module?


texts: Create Drupal User when creating commerce customer

texts:
I am using drupal commerce. What I've found out so far is, that when you create a commerce customer, no drupal user is generated. But without a drupal user attached to the customer, you can't use that data in an order. Am I just missing something, or is this the most useless user-management I've ever seen? What do I have from customers if I can't use them.

Do I have to generate a drupal user first, then change to commerce and generate a customer there and attach the drupal user? Any chance for a one-step-solution?


texts: order of execution of hook_node_presave and custom submit function

texts: Does hook_nood_presave execute before or after a custom form submit handler in the same node ? and I need to perform some action after the node contents have been saved in the database. So, where should put this code ?


texts: putting the most visited content in a block

texts: I need to have the most visited content on a block, I am using view module and I want to know is there any way to do it with view module or I should use an other module


texts: Remove '#empty_option' and '#empty_value' from select list after choosing some option

texts:
I have a form with an entity reference select list where I need to add some default value #empty_value with #empty_option without any referenced entity. How to remove that option from the select list when some other option was selected from the list?
function hook_form_alter() {
  if (isset($form['field_needs']) && isset($form['field_delivery'])) {
    $form['field_needs']['widget']['#empty_option'] = t("Needs");
    $form['field_delivery_area']['widget']['#empty_option'] = t('Delivery zone');
  }
}

I have a content type with entity_reference field type, where can be referenced some form and in node I want add a default item, that will have any value (by default for select was added a first referenced item from entites array). Altering form with checking fields (field_needs and field_delvery_area) in that case works ok because this fields reusable in several existing forms where I need to add a "default option" (but #default_value should be an array of refferenced taxonomies as I understand so I add "default" value using #empty_option


texts: Theming property non-object when transversing the $node object

texts:
I'm getting this error when I run the code below, in reference to $color module:

Notice: Trying to get property of non-object in cotyhouse_preprocess_html()

function cotyhouse_preprocess_html(&$vars){
  // Check if on an article node page
  $node = menu_get_object('node');

  $color = $node->field_title_color;

  print $color;

}

When i output it via dpm, it says its an object, so im a bit confused why it would throw an error. The field value does indeed come through.


texts: Unable to use drush dl. No such file or directory filesystem.inc:267

texts:
I'm trying to download Drupal 7 using Drush 8.1.2, without success. It was working perfectly for months; now, I am getting the following error message on all modules and core downloads when I'm running:

drush dl drupal-7

  copy(/tmp/drush_tmp_1468772300_578bafccc15f2/tar: Failed to set default locale): failed to open stream: No such file or directory filesystem.inc:267
  Project drupal (7.50) could not be downloaded to /Applications/MAMP/htdocs/drupal-7.50

I haven't changed any tmp permissions. What can I do?

I am using PHP 5.6.10 and Drush temporary directory is /tmp.


texts: Better exposed filters override -any- only working on one filter at a time

texts:
I have a view on a Drupal 7 site which brings in all content from 3 content types, which all have 3 different entity reference fields attached to them in order to relate them to specific areas of the site. On the view, I need to beable to filter by the 3 content types, which i have done by creating a filter on type with the 3 options. For the 3 enitity reference fields I also need to be able to filter on all the references but also have an "Any" option to enable it to show all. Due to the design of the website I need the "Any" option to have a friendly title rather than any, which I have implementing using Better Exposed Filters. For some reason the Override any feature of BEF will only override 1 field. And completely ignores the other 2.

It is working on the final filter. If i remove this filter it will work on another one, but never more than one at a time. Is there a setting I'm missing or is this a bug?


texts: Update values of multiple value field programmatically? (Rules action)

texts:
I'm trying to create a rule to populate a multiple value order reference field in Drupal Commerce, on checkout complete.

I haven't been able to achieve this through Rules UI, so instead I'm trying to programmatically create the action but can't figure out how to set the actual value.

I simply want to add a reference of the newly created order to the purchased product, while keeping the references already set (in this particular case an order will never contain more than one product).

I have added an order_reference_field (Commerce Order Reference module) to my product, showing checkboxes with multiple values allowed.

Below my code:

function example_rules_action_info() {
  $actions = array();

  $actions['commerce_set_product_order_ref'] = array(
    'label' => t('Link an order to the purchased product'),
    'group' => t('Custom action'),
    'parameter' => array(
      'commerce_line_item' => array(
        'type' => 'commerce_line_item',
        'label' => t('Line item'),
      ),
    ),
  );

  return $actions;
}

function commerce_set_product_order_ref($line_item, $order) {
  if (in_array($line_item->type, commerce_product_line_item_types())) {

    $sku = $line_item->line_item_label;
    $product = commerce_product_load_by_sku($sku);
    $orderID = $line_item->order_id;

    $wrapper = entity_metadata_wrapper('commerce_product', $product);

    $wrapper->field_order_reference /***** What to do here? *******/

    $result = $wrapper->save();

  }
}

EDIT:

I have gotten a little further with the code below.. It works the first time an order reference is set, but the second time i get the following error "The website encountered an unexpected error. Please try again later."

Found the example a bit down this page: https://drupal.org/node/1021556

function example_rules_action_info() {
  $actions = array();

  $actions['commerce_set_product_order_ref'] = array(
    'label' => t('Link an order to the purchased Product'),
    'group' => t('Custom action'),
    'parameter' => array(
      'commerce_line_item' => array(
        'type' => 'commerce_line_item',
        'label' => t('Line item'),
      ),
    ),
  );

  return $actions;
}

function commerce_set_product_order_ref($line_item, $order) {
  if (in_array($line_item->type, commerce_product_line_item_types())) {

    $sku = $line_item->line_item_label;
    $product = commerce_product_load_by_sku($sku);
    $orderID = $line_item->order_id;
    $wrapper = entity_metadata_wrapper('commerce_product', $product);
    $curr_list = $wrapper->field_order_reference->value();

    if (!$curr_list){
        $curr_list = array();
    }

    $curr_list[] = $orderID;
    $wrapper->field_order_reference->set($curr_list);

    $result = $wrapper->save();

  }
}


texts: Best way to export Commerce orders, line items, and customer profiles from live to dev?

texts:
I've got a massively diverged commerce development site, and I'd like to import all of the orders, line items, users, and customer profiles that have happened on the production site into my development site and then push the database back up to production.

I exported a bunch of tables and then ended up with a significantly borked dev site. Hmm.

I can continue to tweak my tables, but is there a better way to do this?


texts: Batch API is setup in my module but it does not open batch window progress

texts:
I am learning hot to use Drupal for my physics PHD. I was studying how to insert a batch into my custom module.
I wrote a simple module which allows to upload a CSV through a form, check the extension and save it into a directory. This is just a try because i want to use batch API for another custom module
Here is the code:

/**
* Implementation of hook_menu()
*/

function rhmtts_csvimport_menu() {
     $items['rhmtts/csvimport'] = array(
           'title' => 'Import CSV files',
           'page callback' => 'rhmtts_csvimport_page_default',
           'type' => MENU_NORMAL_ITEM,
           'access callback' => TRUE,
           );

     return $items;
}

function rhmtts_csvimport_uploadform() {
      $form['#attributes'] = array('enctype' => "multipart/form-data");
      $form['csvfile'] = array(
           '#type' => 'file',
           '#title' => t("Upload a CSV file"),
           '#size' => 40,
           );
      $form['submit'] = array(
           '#type' => 'submit',
           '#value' => t('Submit'),
           );
  return $form;
 }

           /////// Setup a batch //////////////

  function rhmtts_batch_submit(){

      $batch=array(
          'title' => t('Importing CSV ...'),
          'operations' => array(),
          'init_message' => t('Commencing'),
          'progress_message' => t('Processed @current out of @total.'),
          'error_message' => t('An error occurred during processing'),
          'finished' => 'rhmtts_csvimport_finished',
          );

      batch_set($batch);
      $batch['operations'][] = array('rhmtts_csvimport_uploadform_submit',                    array());

      }

     ////// Define finished function ////////////////////////////

   function rhmtts_csvimport_finished($success, $results, $operations) {

     if ($success) {
        $message = t('All users have had first and last names processed.');
      }
     else {
     $message = t('Finished with error.');
     }
   drupal_set_message($message);
   }

   ///// Methods definition ////

   function rhmtts_csvimport_uploadform_submit($form, &$form_state) {

   // create a csv upload directory in sites/default/files if it doesn't exist
   // yet
   $filepath = 'public://csvuploads';
   file_prepare_directory($filepath, FILE_CREATE_DIRECTORY);

   // save the uploaded file
   $file = file_save_upload('csvfile', array('file_validate_extensions' =>             array('CSV')), $filepath, FILE_EXISTS_REPLACE);
   drupal_set_message('The file you have uploaded is:
'.print_r($file,    TRUE).'
');

  // now read from it
  $realpath = drupal_realpath($file->uri);
  drupal_set_message("The real path of the file is $realpath");
  $fh = fopen($realpath, 'r');

  $table_header = NULL;
  $table = array();
  while(($row = fgetcsv($fh, NULL,';')) !== FALSE){
  if($table_header == NULL) {
  foreach($row as $field) {
    $table_header[] = $field;
    };
    continue;
    };
    $table_row = array();
    for($i = 0; $i < count($table_header) ; $i++) {
    $table_row[$table_header[$i]] = $row[$i];
    };
    $table[] = $table_row;
    }
    fclose($fh);
    drupal_set_message("You have uploaded:
".print_r($table, TRUE)."
");
   }

When i choose a file from the form it completed the operation, but the usual page showing batch progression is not showed. Is this because the operation is to fast? Or there are other problems in the code?

Many thanks

Alberto


texts: Drupal 6 - Core Search Module Not Indexing Node Titles

texts:
Search is working fine on my site if the search includes text that is in the body of a node, but it appears that node titles are not being indexed.

I'm just using the core search module.

Is this by design in Drupal 6 or is this a bug and how can I fix it?


texts:
I've been seeing the use of Apps. What are drupal apps?

Are they just glorified Features with a backend UI? What are the differences between the two on a lower level? The apps project page only gives a pretty high level understanding.


texts: How to override "active configuration" when the theme is installing?

texts:
I have a theme that imports configuration when is installed. The problem is when the configuration is already there and is active.

  Unable to install MYTHEME, field.field.user.user.user_picture,
  field.storage.node.body, field.storage.node.field_image,
  field.storage.user.user_picture, node.type.article,
  views.view.frontpage already exist in active configuration.

I know these errors are because the configuration is already on the site.

How can I override the configuration with a new configuration that is carried from my theme?


texts: How to remove Neighborhood and Address 2 fields in commerce kickstart?

texts: In shipping information form there is these 2 fields( Neighborhood and Address 2 ) which I need to remove but I can not find the solution. Any help?


texts: How to redirect user to an url when node is flagged?

texts:
My problem is related to the Drupal 8 versions of these two modules: rules and flag.

What I want to achieve

Some node types on my site are offering a global flag as a link (for e.g. "report error" flag)
If the user clicks on it, he should be redirected to a special contact form. The flagged node URL should be submitted to an entity reference field automatically on the contact form too.

How I solved it in Drupal 7

In Drupal 7 there was a rules event "node is flagged" to trigger the redirect action. The flagging URL I could pass via Drupal 7 module "entity reference prepopulate" (which functionality is merged into core reference field in Drupal 8).

In Drupal 8 the rules event "node is flagged" seems not to exist.

Any idea how to realise a behaviour like described above in Drupal 8?

THX in advance,

Phil


texts: How to flag or unflag an entity with multiple flags at once?

texts:
I have a large number of user Flags created. When a user performs certain actions on the website a Rule is triggered Flagging them (based on the action) which in turn provides that user with additional access and other privileges. When the user performs an exceptional action on the website the user is Flagged with several Flags all at once, providing them with multiple privileges all at once.

The reason I am using Flags instead of Roles is because there is quite a large number of actions that can be performed on the website; and trying to manage the permissions for such a huge amount or Roles is not only unwieldy but it takes up unnecessary database space, which Flags do not.

So the question then: Is there a way in Rules to Flag a user with multiple flags all at once? For example fetching a list of all Flags based on a Flag property, and then setting all of the flags in this list to "Flagged" for the specific user? At the moment I am setting a single Rules action for every single Flag that needs to Flag the user under certain conditions. This works but is very time consuming. If there is a better to way achieve this without Flags I am open to that as well.


texts: Display popup message when i hover on taxonomy link to display description

texts:
I used Hierarchical Select module in my academic web site for student to select course from dropdown menu and it is works good but i have problem, for each course i  want to add course description as a popup message when we click on course link(Course link displayed as taxonomy link). Can you help me to solve this problem.
I really appreciate to you.


texts: Saving default field values on node_insert

texts:
I would like to automatically save a CCK field which will be determined by the data in the $node object. Using node_save in this instance will cause an error so I need a way to simply insert the additional field into the database.

One obvious way is to simply call db_insert but I'm not sure that this is the best way to do this since most of the information in this table is automatically generated and I'd like to leave that up to Drupal if I can.

What is that standard approach in this case?

Thanks!


texts: What are some possible causes of failure in automatic email sends from User Import?

texts:
In a D7 (up to date) site where the User Import module had been working successfully, it is now generating an error for email-sends and failing to send the Welcome Email that should result from importing a .csv list of users. Tried several email addresses as a test, they did not send. It was working for several years but a lot of things have been updated since then – core and numerous modules. I don't see any details in the site log that clearly define the nature of the error. [The error message in Log is just "Error sending e-mail (from info@our-org.org to name-of-recipient.com)."]

Using the "send test email" option of the SMTP Authentication Support module seems to verify there's nothing wrong with that. I tried going back several versions for both the SMTP Authentication Support and User Import modules but nothing improved. What are some other things to check which could be related to the failure?

==Thanks==

Update: When one stumbles upon a solution, of course it's a relief to have the problem solved but it's dissatisfying when it's not understood exactly what happened. I did not have the Mailsystem module installed, only SMTP Authentication Support and as mentioned, that had been working. I installed Mailsystem to see if maybe that would work better. It did not, but... if I have both SMTP Authentication AND Mailsystem installed, with Mailsystem's config set to "SmtpMailSystem" as the default Delivery method – then it works. Glad it works of course. But the problem is, I don't understand what's really going on since only one module was previously required to make it work.


texts: 7 - Display translated content using Flexslider Views Slideshow

texts:
I have a Views block which uses FlexSlider Views Slideshow as the format. The fields which supply the captions have translations but only the default (English) versions are displayed with the FlexSlider Views Slideshow format. Example of the Views block using FlexSlider Views Slideshow can be seen here.

I have a Views page as part of the same view which uses unformatted list as the format. This handles the translated as expected. Example of the Views page is here.

The captions are from the title field of the content type which use the Titles module so they can be translated.

Other modules in the mix are i18n, i18n_block, i18n_field, i18n_views which enable the content to be translated in the first place.

So, my question is: How to get the FlexSlider Views Slideshow to display translated content?

I've checked the Field Language setting is Current User's Language in the View.

I've checked the Make this block translatable option is checked in the block's configuration.

I've checked the Language Detection Settings are ordered; URL, User, Default

I've cleared all the caches.

I appreciate your suggestions.


texts: How to refresh Composer install to restore missing (deleted) files

texts:
I attempted to install the 8.8.1 Drupal Core security update using the command

composer update drupal/core webflo/drupal-core-require-dev --with-dependencies

I've used this many times. However, this time the update failed with the following messages

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 12 updates, 0 removals
  - Updating symfony/finder (v3.4.33 => v3.4.36): PHP Fatal error:  Uncaught
Error: Class 'Symfony\Component\Finder\Comparator\NumberComparator' not found in /<my path>/vendor/symfony/finder/Finder.php:120

After this error, the entire vendor/symfony/finder directory is empty.

QUESTION: What's the best way to "refresh" my composer install to get the correct files back? I have reasons for not wanting to use the available server backup if I can avoid it.


texts:
Getting this

PHP Fatal error:  Class 'views_plugin_display' not found in ../sites/all/modules/contrib/media/includes/media_views_plugin_display_media_browser.inc on line 18, referer: ..

Any ideas how I can fix that?

Thanks,
Dmytro


texts:
For some reason I am unable to get into my form_submit function. I have attempted to add a custom handler to the #submit to force the form to submit to it however I haven't gotten any where. Any advice on what I'm doing wrong would be appreciated.

function cheo_whiteboard_admin_form(){

 if(user_access('administer')){
   $form['admin_menu'] = array(
    '#type' => 'fieldset',
    '#title' => t( 'Admin Menu' ),
   );
$form['admin_menu']['admin_menu_archive'] = array(
  '#type' => 'submit',
  '#value' => 'Archive Search',
  // '#submit' => array('cheo_whiteboard_admin_form_submit'),
);

$form['admin_menu']['search_date'] = array(
  '#type' =>'date_popup',

);

$form['admin_menu']['special_instructions'] = array(
  '#title' => 'Special Instructions:',
  '#type' => 'textfield',
  '#size' => 75,
);
$form['admin_menu']['staffing_officer'] = array(
  '#title' => 'Staffing Office Status:',
  '#type' => 'textfield',
  '#size' => 75,
);

 $form['#submit'][]='cheo_whiteboard_admin_form_submit';

return $form;
}

  function cheo_whiteboard_admin_form_submit($form, &$form_state){
    dpm($form);
}


texts: Show menu link as expanded when on node pages for a content type?

texts:
I need to show a menu link as expanded when you are on the node page of a certain content type.

These nodes don't actually have menu link but are navigated to, through a menu link and taxonomy terms.


texts: How can multiple sites use a common default theme with site specific customizations?

texts:
We are using Aegir, we would like to use one core theme for all of our websites which handles common theming. But for specific theming for each site, we would like to handle inside of their custom themes.

Basically this will enable us that we can change common theming in just one theme used by all, instead of making the same changes in every theme of respective site.

One challenge by creating the custom theme in one of websites it will overwrite code from common core theme, but both themes should be present in the same time.
Is there any kind of solution for something like this?


texts: Uploading files to two separate locations

texts:
I'm uploading a clients website early next week and they've just informed me that they use load balancing software to distribute over two servers.

Normally this wouldn't be an issue because content is stored in the database and as long as both files areas can access it then it should be fine.

However, the issue comes in when uploading files. I've been informed that files should be uploaded to both servers.

I wouldn't even know where to begin to make this modification. Can anybody shed some light on it for me?

Is there a global method that's invoked when files are uploaded?

Note: This needs to work with the file field on several content types and even when files are added through modules/cck


texts:
My client would like a content type that has to be purchased by a registered user on a node-per-node basis.

A previously registered user will see a view with the available content they can purchase and then that user can purchase individual nodes. These nodes that have been purchased will also appear in a My Library view as well.

I have found multiple tutorials on how to do this via D7; however, I can't seem to find anything that shows how to do this on D8.

Can Drupal 8's Commerce Module do this out of the box or will I need to install additional modules to reach this functionality.

I am trying to find the right configurations of Products, Orders, and Stores but so far to no avail.