Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added extra handling for hero images on custom content types fixes is… #727

Closed
wants to merge 2 commits into from

Conversation

g3r4
Copy link

@g3r4 g3r4 commented Feb 8, 2018

Issue #726

Problem

If you use a custom content type (not provided by Open Social) and happens to have a long name, the validation above will fail because machine names can only be 26 characters long.
In order to at least have the possibility of having an image set, new code needs to load an image field as hero, as long as it has the word "image" on its field name and it is an image field.

Solution

I've written code to handle this special case

Issue tracker

Created the issue directly on GitHub

HTT

  • Check out the code changes
  • Login as user admin and create a content type with a "long" name (21 chars or more), then assign an image field following convention " image" so machine name would be field_<content_type_name>_image, create a new node based on that content type including uploading an image.
  • Notice it doesn't work, hero image won't load
  • Checkout to this branch
  • On the content type you just created, if you add an image field that has the word "image" in its machine name (you can even re-use one of the image fields established for the default content types) and is an image field, the hero image will load.

Documentation

  • This item is added to the release notes
  • This item is documented on LGOS
  • This item has been added to the feature overview

@jaapjan jaapjan added team: external This PR originates from an external contributor type: feature Adds a new feature to Open Social labels Feb 13, 2018
@jaapjan jaapjan added this to the 1.10 Release milestone Feb 13, 2018
@jaapjan
Copy link
Contributor

jaapjan commented Feb 13, 2018

I've created a new PR for this #728 in order to run the necessary Travis checks. Will let you know once it is reviewed.

@jaapjan jaapjan closed this Feb 13, 2018
@jaapjan
Copy link
Contributor

jaapjan commented Feb 14, 2018

I've merged the mentioned PR and I've given you credit in the commit message @g3r4 Thanks again for your contribution!

@jaapjan jaapjan removed this from the 1.10 Release milestone Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: external This PR originates from an external contributor type: feature Adds a new feature to Open Social
2 participants