## Getting Error When Attaching Video URL To Product

Done With API Key Configurations:

Error Getting when entering url

## Visualizing a Whitehead product: the attaching map $S^3\to S^2\vee S^2$

There are lots of great, easily accessible images and videos that illustrate the Hopf map $$S^3\to S^2$$ by describing what happens to the fibers in the unit cube $$[0,1]^3$$. Is there a similar way to visualize the map $$S^3\to S^2\vee S^2$$, which is the attaching map of the $$4$$-cell of the product $$S^2\times S^2$$ and allows one to the construct the first interesting higher whitehead product?

I understand that this map is the restriction of the product of the characteristic maps of the $$2$$-cells of $$S^2\vee S^2$$ but I think it’d be nice to be able to understand this visually in a $$3$$-cube. For instance, I wonder if any pairs of fibers appear to be linked.

## Mail command body empty while attaching files

In ubuntu 16.04 the below command works fine the mail will have a body and file attachment the mail command version is mail (GNU Mailutils) 2.99.99

mail -s “test” -A /tmp/test.txt test@test.com < /tmp/log.txt

But the same command does not work in Ubuntu 18.04 the file is being attached but the body is blank the mail command version is mail (GNU Mailutils) 3.4

## WANTED: User-friendly way to assign owner/permission when attaching a new serial devices (USB, BT, etc)

When attaching a serial device (e.g an arduino via USB or Bluetooth), the owner:group is set as root:dialout, e.g:

crw-rw---- 1 root dialout 166, 0 Apr 15 18:08 /dev/ttyACM0 

However, even when the regular user is part of the dialout group, it is necessary to change permissions on the device file (to 666).

This is only temporary until the device has been disconnected. A persistent solution is to modify the udev file. See e.g. this link and this link

This can be confusing, not least when the Bluetooth system tool (blueDevil on KDE) can detect USB devices, but not connect to them.

It seems to me, that either the default behaviour should be to grant dialout users write access or the least this should be part of the GUI system setting tools.

## Problem attaching files to nodes with Services

I’m trying to attach files (images) to nodes via Services 3 from an external app using JavaScript.

From what I understand (and doing) is:

1) Create a node posting JSON to my endpoint domain.com/api/node.json

{   "type":"foo",   "title":"Hello World",   "language":"und",   "body":{"und":{"0":{"value":"Body Text"}}}, } 

2) Create file posting JSON to my endpoint domain.com/api/file.json

{   "filename":"image.jpg",   "target_uri":"public://image.jpg",   "filemime":"image/jpeg",   "file":"myBase64String" } 

No problem at all at this point.

Then when trying to attach the files created to the node, is where I have trouble, not http errors, simply nothing happens.

First I have tried posting JSON to my endpoint domain.com/api/node/*nid/attach_file after successfully creating a new file, and getting back the fid

{   "field_name":"foo",   "filename":"image.jpg",   "fid":"*fid" } 

Returning Status 200 OK empty text, but when viewing the node remains the same without the file attached.

I have also tried to create the files first and then when posting for node creation adding the fid, the node is created but no file attached.

{   "type":"foo",   "title":"Hello World",   "language":"und",   "body":{"und":{"0":{"value":"Body Text"}}},   "field_foo":{"und":{"0":{"fid":"*fid"}}} } 

My field is a field type Image, widget Image. I have also tried in another field type file, with same results.

If someone can give me a heads up, what am I doing wrong or what is missing. I can’t find any explanatory documentation on line.

Thank you.

## Unit of Work – Erro: “Attaching an entity of type ‘EntityB’ failed because another entity of the same type already has the same primary key value”

Essas são minhas classes de exemplo:

public class EntityA {   public string Id { get; set; }   public decimal AproveValue { get; set; }   public string EntityB_Id { get; set; }   public virtual EntityB EntityBs { get; set; } }  public class EntityB {   public string Id { get; set; }   public decimal Name { get; set; } } 

Essa é a minha classe de repositório:

public void Update(T entity) {    _myDbSet.Attach(entity);    ((IObjectContextAdapter)MyContext).ObjectContext.ObjectStateManager.ChangeObjectState(entity, EntityState.Modified); } 

Eu uso o padrão Unit Of Work para gerenciar o contexto.

Quando eu tento atualizar a propriedade EntityA.AproveValue e chamo o método de update do repositório, na linha _myDbSet.Attach(entity) é lançado esse erro:

Attaching an entity of type 'EntityB' failed because another entity of the same type already has the same primary key value.  This can happen when using the 'Attach' method or setting the state of an entity to 'Unchanged' or 'Modified' if any entities in the graph have conflicting key values. This may be because some entities are new and have not yet received database-generated key values. In this case use the 'Add' method or the 'Added' entity state to track the graph and then set the state of non-new entities to 'Unchanged' or 'Modified' as appropriate. 

Eu já tentei fazer assim:

 MyContext.Entry(model.EntityB).State = EntityState.Unchanged; base.Update(model);  

Mas não funcionou!

Eu preciso manter a propriedade navegável.

E esse problema acontece com todas as propriedades navegáveis do projeto.

## How do I integrate media (e.g. attaching audio) to nodes?

I installed the Media Entity module for Drupal 8. I thought it would somehow facilitate adding Mp3, etc, as Media does in Drupal 7, where I could specify a media player type for an audio file. (And things work fairly well.) I am updating my site to Drupal 8 and it seems the Media Entity module only acts as an API. Maybe I just need to wait for an official Drupal 8 release before I get too far in the weeds with media?

Since I am grabbing Mp3 files from my previous site, ideally there would be a media field to which I can, in code, just add the field info, with the rendering of the field being determined by the form display settings.

Anyway, I am sure a lot of people are trying to figure this out in Drupal 8, so if anyone has a good approach, I am all ears!