Thank you Mr. Baheyeldin for this project.
In order to get the Stock Module to work in Drupal 6.4, I had to update some of the older 5.x calls (menu, theme, form) to correct 6.x versions.
I am new to the Drupal community, so I hope this contribution is correctly submitted.
| Comment | File | Size | Author |
|---|---|---|---|
| stock.zip | 3.15 KB | Büke Beyond |
Comments
Comment #1
oadaeh commentedThere is already a Drupal 6.x compatible release. Are you saying it doesn't work with Drupal 6.4? If so, you should submit a patch which shows the differences between what is available and what you did to change it.
Comment #2
kbahey commentedThere is a stable release as well as a development release.
Please try the stable release first, if it does not work, then use the development release and submit fixes to it.
Comment #3
Büke Beyond commentedI have, of course tried both of the versions 6.x-1.x-dev and 6.x-1.0 under Drupal 6.4. They were not working at all. Examining the code this was clear, and it is difficult to conceive how it would work under 6.x according to the API docs.. Has anyone tested it under 6.x?
Let's look at some of the stock.module from 6.x-1.x-dev problem lines
Line 100: 'callback arguments' will not work as it has been renamed to 'page arguments' for 6.x. Because of this the Admin settings would not come up.
MENU_LOCAL_TASK is not necessary as it will ignore the 'title' and use "Home" instead. And $title is forgotten to be defined (which is not a Drupal issue).
Line 278:
return array();
for theme registration is wrong for 6.x and will halt all the output. it should be
return array( 'stock_page' => array() );
Line 144:
function stock_form_definition($symbols) {
the actual callback under 6.x is
stock_form_definition($form_state, $symbols) {
so the saved user symbols would not show up in the form, and cause a preg error in bootstrap.inc.
Just discovered:
Line 377:
return _system_update_utf8(array('stock'));
_system_update_utf8() has been discontinued since 5.x
this callback reports a 'necessary' database update that will fail.
I will look into creating a patch.
Comment #4
kbahey commentedPlease make sure that the patch in the proper format, against the DRUPAL-6--1 tag, or the 6.x-1.x-dev tarball.
See http://drupal.org/patch for details on how to do so.
Thank you.
Comment #5
kbahey commentedCommitted to the -dev version, which should be created in a new tar ball in 12 hours or so.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
emdalton commentedThe fix posted above works, but 6.x-1.x-dev still doesn't work. Is this going to be fixed? It's been nearly a year.
Comment #8
kbahey commentedI put a fix and created a new version here http://drupal.org/node/574282, and a tarball should be created shortly.
Please download and install and check if it works. Set this issue to fixed if it is so.