Description
A small module that helps with nodes that could be seen as configuration. For example a news view. Instead of making a view with a page display with a fixed path, title, etc., you create a block display and configure a Functional Content item for it and enter a node id. This node then becomes the url, title, etc around this view. You browse to this node and the view will be displayed. This means that content editors can change the node (new title, new url, etc) without breaking the view. Also, if you use features for storing the view-configuration, these features won't be overwritten anymore because the title or url of the page changes.
This module is used in https://www.drupal.org/project/dvg
Project page
https://www.drupal.org/sandbox/spadxiii/2164153
Git
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/SpadXIII/2164153.git functional_content
Reviews
[D7] LinkEX
[D7] Double Slash Fix
[D7] Entityreference Select View Per Context
Comments
Comment #1
SpadXIII CreditAttribution: SpadXIII commentedComment #2
SpadXIII CreditAttribution: SpadXIII commentedFixed git url
Comment #3
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxSpadXIII2164153git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #4
SpadXIII CreditAttribution: SpadXIII commentedThe PA robot found some comment-'issues' and long lines, but gave the wrong link. The correct one is http://pareview.sh/pareview/httpgitdrupalorgsandboxspadxiii2164153git-7x-1x.
Comment #5
SpadXIII CreditAttribution: SpadXIII commentedI just fixed the minor issues the PA Robot reported. Only doc comments, blank-line and the readme.txt 'issues'.
Comment #6
sendinblue CreditAttribution: sendinblue commentedFor review by me
Comment #7
sendinblue CreditAttribution: sendinblue commentedManual Review
- Remove the packaging lines from the .info. These will be added when the module is published.
- All variables used in your module should be removed in hook_uninstall().
- You must use check_plain() in functional_content_admin_config() for example where you do '#title' => $view_info['view_label'] . ' - ' . $view_info['display_label'] (filter_xss() or filter_xss_admin() are alternatives to check_plain() if you want to allow some tags here). Same for all your #description values, you should apply check_plain() in functional_content_admin().
Comment #8
SpadXIII CreditAttribution: SpadXIII commentedAnd back to needs review :)
Comment #9
naveenvalechafunctional_content.install : module_load_include('module', 'functional_content'); Wrong syntax and No need to load module file here because you can call the functions defined in module file in any file.I found there is no usage of this.Is it ?
Comment #10
SpadXIII CreditAttribution: SpadXIII commented@naveenvalecha I changed the load function to be drupal_load. Should be the correct one now.
The module is already disabled, which makes drupal not load the .module anymore. When uninstalling the module, I need to load its .module so I can use the defines to remove the variables.
Comment #11
naveenvalechaThere is no need to load the module file because you are getting the variables directly from the variables table and removing them using the variable_del.
So I have not seen any use of the module load include.we should not use it at all.
This is not a release blocker but you should remove it.
Another thing that I have noticed that your commits are not linked with your drupal profile. See the git instructions properly https://www.drupal.org/project/2164153/git-instructions So that the commits will display on your user profile page.This will show your contribution on your profile as well.
Comment #12
SpadXIII CreditAttribution: SpadXIII commentedI'll do some tests with the include. Afaik. because the module is already disabled, the .module isn't loaded automatically anymore. I could also just create the defines in the .install as well and not do an include at all. A little bit of duplication, but might be better than loading the .module file.
ps. I fixed the correct emailaddress in my repository. Downside of using multiple computers... :)
Comment #13
davidam CreditAttribution: davidam commentedAutomated Review
Yes. You can check: http://pareview.sh/pareview/httpgitdrupalorgsandboxspadxiii2164153git
Manual Review
Individual user account
Yes. You can read https://www.drupal.org/node/272587
No duplication
I would like read your explanation about why is better this method to enable the block for a specified node id with the standard block settings.
Master Branch
Yes. You can check: https://www.drupal.org/node/1127732
Licensing
Yes. You can check: https://www.drupal.org/licensing/faq
3rd party code
It's ok, too: https://www.drupal.org/node/422996
Code long/complex enough for review
Yes. You can check: https://groups.drupal.org/node/195848
Secure Code
Yes, you can check
+ https://www.drupal.org/writing-secure-code
Coding style & Drupal API usage
In .info you must introduce entity_reference_autocomplete as dependency.
Comment #14
SpadXIII CreditAttribution: SpadXIII commented@davidam quick reply to your questions:
You don't want to give your content editors (not site administrators) access to the block interface. You might add a role for a 'super editor' and give them access to the Functional Content node-settings. Then they can change nodes for certain views. They can editor those without breaking the site.
By using context and this module, you can create features with every setting available. The node-nid is then moved towards 'content' (differs per environment). Creating a custom module with a hook_update, you can create an empty node and set it as the correct Functional Content node.
It's an optional dependency, so I can't just add is as a hard dependency. Functional Content works fine without it: it just shows simple input fields instead of an autocomplete field to select the node.
Comment #15
zeeshan_khan CreditAttribution: zeeshan_khan commentedHi SpadXIII,
I tried to review your module by following your installation and configuration steps everything worked fine to me but at the end I couldn't find my view block on that node page, I followed these steps.
1. Create a view with a block display
2. Create a node and remember its node id
3. Go to the functional content settings
4. Enable the functional content for the view block you just created
5. Optionally have the module generate a context; enter the context name, tag
and select the region for the view block
6. Save the settings and go to the functional content nodes
7. Enter the node id from the node you created step 3
8. If you did generate the context, you're ready to go! Just browse to the node
you created in step 3 and see the marvelous view appear in the region you
selected!
If you did not choose to automatically generate the context, you can create
your own; just select the correct Functional Content-callback in the
Callback conditions, etc. - This step didn't work out
Any idea?
Comment #16
klausiReview of the 7.x-1.x branch (commit d226353):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
But that a re not application blockers, otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to patrickd as he might have time to take a final look at this.
Comment #17
SpadXIII CreditAttribution: SpadXIII commented1. Good suggestion, will fix that asap
2. Fixed
For the other items, I added or extended the comments
Thanks for the reviews!
Comment #18
SpadXIII CreditAttribution: SpadXIII commented@zeeshan_khan almost forgot to reply to you. I think it's a caching thing in the Context Callback module; the context callbacks are cached and not directly visible. I'll investigate the Context Callback module to see if I can find a fix.
Comment #19
klausino objections for more than a week, so ...
Thanks for your contribution, SpadXIII!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #21
apaderno