The Computed Field Order module helps to deal with the situation of fields
being computed in the order in which they are found in the "field_config_instance"
database table. Since that table is largely populated in the order in which you
add fields to an entity, one may control the order of computation by adding
fields in the order desired. Occasionally, however, it may be necessary to
have a later-added field computed before an existing field, such as when a field
containing data must be deleted and re-added. The easiest solution to this is to
delete and redefine the subsequent fields, thereby preserving the database integrity.
But if there are a lot of uses of that field and re-saving the content is difficult,
then this module may help you restore the desired computation order.
If there is any way to take the manual solution above, we reccommend doing so.
You are strongly urged to back up your database before using this module.
We also suggest testing your site after using it, particularly the fields you
are altering.
* Install and enable the module in the usual manner.
* Back up you database (optional, but reccommended).
* Go to admin/config/content/computed_field_order
(Configuration >> Content authoring >> Computed Field Order).
* Click on the bundle type that needs to be changed.
* Drag the field handles to the order you want.
* Click on the "Change order" button.
* Test to make sure the correct effect has occurred.
You may disable the module when it is not in use so that it
is not loaded at every page build.
Link to sandbox Project
https://drupal.org/sandbox/ssoulless/2187993
Git clone command line
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/ssoulless/2187993.git computed_field_order
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | computed_field_order.png | 3.8 KB | pushpinderchauhan |
Comments
Comment #1
hayashi commentedHi @ssoulless
Please add link to your git repository.
I found issue in computed_field_order.info.
dependencies = computed_fieldshould be
dependencies[] = computed_fieldComment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxssoulless2187993git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
ssoulless commentedHello, so I just need to correct the problems and then put the needs review state again? or I should create another issue?. Thanks
Comment #4
dsim commentedHi,
Just fix the issues and commit it and update the same issue with "Needs reviews" state.
Also add the "git clone" command in issue summary.
Also please take care of the following:
In module file, line 106,
"admin/config/content/computed_field_order/$row->entity_type/"
It can be better if you use the variables out of double quotes using concatenation.
Thanks
Comment #5
ssoulless commentedOk I will. Thanks
Comment #6
ssoulless commentedComment #7
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #8
ssoulless commentedHi I just commited the changes, please review them. I think I can maintain the module now would be great if I can create the project, I have the module working in one of my production sites and is working great =)
Thank you
Comment #9
Sachini commentedManual review of the 7.x-1.x branch:
The git clone command should be "git clone --branch 7.x-1.x http://git.drupal.org/sandbox/ssoulless/2187993.git computed_field_order" as it appears in your sandbox. The command you have given is for you, with maintainer access.
computed_field_order.module
Comment #10
Sachini commentedComment #11
ssoulless commentedOk link command fixed.
and for the problem of the $info variable please check the comments above that line.
Comment #12
ssoulless commentedComment #13
pushpinderchauhan commented@ssoulless, first of all thankyou for your contribution.
Manual Review

1. (*) You have keep all your code inside
.modulefile, for configuration form create one separate file something likecomputed_field_order.admin.inc.2. I installed your module and access the
admin/config/content/computed_field_orderpage but as I don't have added any computed field so no bundle is appearing there. But it is still showingClick on a bundle name to expose the computed fields for that bundle.. I think this message should appear when$itemscount is > 0.3. After this I created one computed field inside article content type and access this page, it is still showing me same screen without any change. Then I manually check
admin/config/content/computed_field_order/node/articlepage, it showed me computed field. It need to be fixed as end user not able to understand how computed field would appear.4. Let me check by adding one more computed field in page content type, now its a strange issue it is appearing as:
Let me check your $item array,
Strange, it also showing me only one content type name i.e page. Article content type still not in array.
Interesting, I need to debug your code because I am still able to see computed field in Article content type. There is some major logic failure in following code. Every time first it goes to else statement because $items array is always empty and inside your else statement there is no link added for bundle. This is the problem that you need to fix in a good manner because your first element always skipped due to this else statement.
Anyways, thankyou for your hardwork :)
Comment #14
ssoulless commentedho that's weird, maybe I broke something in the last commit, let me check
Comment #15
ssoulless commentedOk taking a look to the issue @pr.pushpinderrana when using custom content types it works normally, it does not work with native drupal content types =/ I will check whats going on, also the next commit will separate the admin for the configs in the drupal UI
Comment #16
ssoulless commentedok @pr.pushpinderrana the problem is in the query just here
it seems its not getting all the content types with its computed fields, can someone tell me what is wrong with the query?
Comment #17
ssoulless commentedCommited computed_field_order.admin.inc
Still looking forward for fix the problem with the query that gets all the content types with computed fields, if I cannot fix the issue Im going to show a list of all content types and let user choose the content type the user wants to change the computation order, if the content type does not have computed fields it will be empty otherwise the module will show the the computed fields, it is working right now if you type the path
For Example:
Build a list of links with that menu structure will work
Comment #18
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.