View listing related nodes by taxonomy term

I have a content type representing a book. Each book as a genre (SciFi, Fantasy, Thriller …) and I would like to expose, on the page of a book some books sharing the same genre.

I created a view with a contextual filter on the taxonomy term, but I retrieved the current book so I added a contextual filter on tue current node id to exclude it.

Now I don’t retrieve anything from my view.

Each contextual filter on his own his working. If I just use the contextual filter on the content id, I retrieve the list of my books without the current book. If I just use the contextual filter on the taxonomy term, I retrieve the list of my book for that genre (including my current book).

How am I supposed to proceed to have both filter working together ?

How to export a SP list with a view called “MyView” with PnPPowershell?

Hi I have this code which work great. But now I want to export the list in a certain view I have created. How can I do that.

$  hashTable = @() $  items = Get-PnpListItem -List "MySchedule" foreach($  item in $  items) { $  HashTable += New-Object psobject -Property @{  'Datum'=$  item.FieldValues.Datum.ToLocalTime().ToString("dd.MM.yyyy"); '00:00 - 07:59'=$  item.FieldValues._x0030_0_x003a_00_x0020__x002d__; '08:00 - 16:59'=$  item.FieldValues._x0030_8_x003a_00_x0020__x002d__; '17:00 - 23:59'=$  item.FieldValues._x0031_7_x003a_00_x0020__x002d__;   'Opmerkingen'=$  item.FieldValues.Opmerkingen;    }  }  $  hashTable | Select Datum,'00:00 - 07:59','08:00 - 16:59','17:00 - 23:59',Opmerkingen | epcsv "c:\temp\myschedule.csv" -NoT 

Gr, P

Is it possible to create an Ubercart Orders view that includes line item details?

I would like to create a View of Ubercart Orders that includes details about the order itself — collecting the various line items into a single column. Ultimately this will be used to generate a Views export.

But out of the box, it doesn’t appear as though Order line item details are available to Views. Are there any known ways to achieve this easily?

Help with view filters

I have a view using one content type: fee_schedule The view contains fields for species, keywords (hidden), and the title.

The filters need to show ALL species except when searching by keywords. The keywords field and the title field are combined using Global Combine fields filter that is exposed.

Here’s the issue: When someone uses the exposed species drop down, it works as expected. It shows the ‘All’ species and which ever species they selected. But when they put in keywords (like ‘bulk’) then it still shows All species (even though these species do not have ‘bulk’ as a keyword), along with the species that do have the keyword ‘bulk’. When searching using keywords, I need the view to display ONLY the species with the keyword. When searching by species, I need it to show the content with All species and the specific species they selected.

Here’s the link to the view: https://vdl-dev.umn.edu/services-fees

I am using and/or filtering as follows:

Content Published: yes AND Content Type: Fee Schedule AND Global Combined fields filter exposed (title and keywords) AND Content Species (each specific species but not All)

OR

Content Species (All is only selected)

Maybe I can’t do what I need to do using views. Any help much appreciated.

Adding `clone` link in view fields

I’m trying to add a clone link in view fields

Content: Clone link

and I get the column in the result, but no link, i.e. the td is empty

Any idea how to get it to display?

See attached img for more info

enter image description here

enter image description here

enter image description here

BTW: When I installed a fresh dupal with the relevant modules, I didn’t get this issue.

I get only on the production installation (and on local clone)

Adding `clone` link in view fields

I’m trying to add a clone link in view fields

Content: Clone link

and I get the column in the result, but no link, i.e. the td is empty

Any idea how to get it to display?

See attached img for more info

enter image description here

enter image description here

enter image description here

BTW: When I installed a fresh dupal with the relevant modules, I didn’t get this issue.

I get only on the production installation (and on local clone)

create date folder version backups with hard links and a combined view

I am using the ideas laid out in this article to create incremental versioned backups of my data. I basically sync the data to a current folder in my backup destination and then create a date folder with hard links to the current folder. I end up with this:

$   ls ... 2019-01-01_10-00-01 2019-01-02_10-00-01 ... 2019-02-15_10-00-01 ... current 

It works great. If I ever need to do a full restore from a specific date, I can just restore everything from that date’s folder.

But if you’re looking for previous versions of a specific file, you have to go through each of the date folder’s to find what you want. I want to create another folder that has a running total of all files, each time they were changed. A combined view if you will.

I came up with this, and it works, but I am wondering if there is a more elegant, standard way to do this.

#!/bin/bash  NOW=$  (/bin/date +\%Y-\%m-\%d_\%H-\%M-\%S)  # the data that needs to be backed up SOURCES=("/path/to/source 1" "/path/to/source 2")  # where it is going DESTINATION="/path/to/backup"  # make sure the destination exists mkdir -p "$  DESTINATION"  # make sure there is a place to put the current data mkdir -p "$  DESTINATION/current"  # make sure there is a place to put the "combined" data mkdir -p "$  DESTINATION/combined"  # sync the data rsync -v -a --delete "$  {SOURCES[@]}" "$  DESTINATION/current"  # check if files were backed up # any file with only one link is either new, and needs to have a hard link version # or it wasn't fully backed up previously and needs a hard link version if [[ $  (find "$  DESTINATION/current" -type f -links 1 | wc -l) -ne 0 ]] ; then     # make a date folder backup using hard links     cp -al "$  DESTINATION/current" "$  DESTINATION/$  NOW"      # make a combined view     #  - find all files with 2 links     #    - one link is to the file in the $  DESTINATION/current     #    - the other link is to the file in $  DESTINATION/$  NOW     # - there should never be any files with only 1 hard link since the previous command     #   is sure to have created a second link     # - any files with more than 2 links were, hopefully, already covered during a previous iteration     cd "$  DESTINATION/current" && find * -type f -links 2 -print0 | while IFS= read -r -d $  '' filePath     do         fileName="$  (basename "$  filePath")"         fileFolder="$  (dirname "$  filePath")"          # where the file will live in the combined folder         # need to mirror the folder structure         destinationFolder="$  DESTINATION/combined/$  fileFolder"         mkdir -p "$  destinationFolder"          # make a hard link to it         cp -al "$  filePath" "$  destinationFolder/$  fileName.$  NOW"     done fi 

The code does work. After a few iterations, this is what it creates:

Files in the current folder (this is a “live” copy of the source data):

backup/current/source 1/001 backup/current/source 1/002 backup/current/source 1/003 backup/current/source 1/file 100 backup/current/source 1/folder/004 backup/current/source 2/006 

Files in the date specific folders (note files from the first backup have files that aren’t in the second because they were deleted):

backup/2019-01-15_23-08-02/source 1/001 backup/2019-01-15_23-08-02/source 1/002 backup/2019-01-15_23-08-02/source 1/003 backup/2019-01-15_23-08-02/source 1/file 100 backup/2019-01-15_23-08-02/source 1/folder/004 backup/2019-01-15_23-08-02/source 1/folder/005 backup/2019-01-15_23-08-02/source 2/006 backup/2019-01-15_23-08-02/source 2/007  backup/2019-01-15_23-09-00/source 1/001 backup/2019-01-15_23-09-00/source 1/002 backup/2019-01-15_23-09-00/source 1/003 backup/2019-01-15_23-09-00/source 1/file 100 backup/2019-01-15_23-09-00/source 1/folder/004 backup/2019-01-15_23-09-00/source 2/006 

And these are the files in the combined view:

backup/combined/source 1/001.2019-01-15_23-08-02 backup/combined/source 1/002.2019-01-15_23-08-02 backup/combined/source 1/003.2019-01-15_23-08-02 backup/combined/source 1/003.2019-01-15_23-09-00 backup/combined/source 1/file 100.2019-01-15_23-08-02 backup/combined/source 1/folder/004.2019-01-15_23-08-02 backup/combined/source 1/folder/004.2019-01-15_23-09-00 backup/combined/source 1/folder/005.2019-01-15_23-08-02 backup/combined/source 2/006.2019-01-15_23-08-02 backup/combined/source 2/006.2019-01-15_23-09-00 backup/combined/source 2/007.2019-01-15_23-08-02 

This way, if I need to find a previous version of source 1/folder/004, I just need to go to it’s matching folder in backup/combined/ (backup/combined/source 1/folder) and all the 004 files are there, with a date/time stamp appended.

Is there a better, more elegant way to do this?

Can’t View Apache Test Page Using Ubuntu Server AWS

I have an AWS instance running Ubuntu. I installed Apache and Ngix with the following commands:

 sudo apt install apache2 apache2-utils libapache2-mod-python libapache2-mod-php sudo service apache2 stop sudo apt install nginx sudo service nginx stop sudo service apache2 start 

From my understanding, if I go to the public DNS of my AWS instance, I should be getting the Apache test page. However, it is just timing out. I viewed /var/www/html and the index.html page is there, along with another .html page.

Is there something else I need to do? Or configure in AWS?

How to specify image path relative to module in Knockout HTML view?

I’m making a magento 2, usign 2.2.6, module trying to display certain information at the checkout and I’m stuck when trying to add an image relative to the module path.

I’m NOT using PHTML in this case, and I’m trying to don’t have to

FYI: I’ve read the question How to specify skin image path in Knockout HTML template?

And this one is for obtaining images relative to the theme path, not to the module.