I get this error when I view my first test issue as administrator

warning: Invalid argument supplied for foreach() in /home/carabusonline/coleoptera-international.co.uk/sites/all/modules/cck/content.module on line 1278.

I get access denied for the article if I try and view as an unauthenticated user so I guess I've missed a permission setting somewhere, but I really don't know where.

Finally, I can't get the cover to show up.

Sure these are simple faults, but I've been tearing my hair out about them for a while now so any help very gratefully received

Comments

matthew_ellis24’s picture

should mention that the issue page is:
http://www.coleoptera-international.co.uk/ejournal/show/1/_/1

And also that I'm an idiot and that the first part of this issue is a duplicate
http://drupal.org/node/351434
And yes I have added an abstract field using CCK

romca’s picture

hi,
there have been issues with cck (fixed, at least I believed until now), I will have to investigate that - does that error happen only when you view the issue? and only as an administrator?

as for the access denied - by default, the articles is not visible to users until the issues is *published*. After that, the access setting is changed.

if you want to have it different, please use the ejournalaccess.module that allows you to set the settings before/after the issue publication for different roles

to display the cover, normally, you create the node for the issue and put its node id into the issue form (when editing issue), ie. 20

matthew_ellis24’s picture

Hi,
I get the error both as an administrator and an unauthenticated user.

I have done what you suggest with the cover but it just doesen't appear for some reason. I created a page node (id=3), and put 3 in the cover box, but nothing shows up.

Something seriously screwy is going on. I uninstalled and reinstalled this module because of all the errors I was getting, but I'm still getting a load of odd behaviours:
- I can't find the author tab at admin/ejournal. I've gone to /admin/build/menu and I've used the devel module to rebuld the menus. Profile is installed, enabled and configured. I have a user role "ejournal author" and have assigned users to journal1-author.
- If I try to delete a volume I get a white screen error Fatal error: Call to undefined function ejournal_invoke_all() in /home/carabusonline/coleoptera-international.co.uk/sites/all/modules/ejournal/ejournal.module on line 1702
- If I try and delete an issue of any type (current/future/unpublished etc) then I go through all the screens pressing delete, but then back at the journal management screen the issue is still there
- I saw on previous support issues that it was mentioned the drupal 6 version had inbuilt workflow functions, but I don't see how that's meean to be set up for editorial and peer review.

I got fed up with OJS looking ugly and being a nightmare for other users to use so thought this was a better option. I do very much want to use this module, but I just can't get it to work! Like I said, I'm sure I'm doing something pretty simple wrong and just need nudging in the right direction :)

romca’s picture

hi,
first of all, big warning - the peer review is not implemented in ejournal! Shall I add "yet"? Well, hmm I'm seriously thinking about asking more developers to join, I am missing time...

so, if you hope to have peer-review with Drupal (and you dont know how to do that with some sort of the workflow module), then please dont use this module for now

I will have to look closely at the module for the issues you reported, it is not possible right now, perhaps during the weekend. Thanks for the report

best,

matthew_ellis24’s picture

romca,
OK thanks for that. Presumably I can do a manual workflow though so that submitted articles are set to unpublished until they've passed peer review? I'd much rather use ejournal with slightly reduced features waiting for the day they're hopefully added, than use OJS and put up with it's ugliness!

Matt

romca’s picture

Matthew,

thanks for the rport, the volume_delete has been fixed, as well as issue_delete

the error with cck looks similar to the one at: http://drupal.org/node/351431 , that one was fixed earlier, please install the dev version (or get the new beta), and tell me if that fixes is (I cant reproduce the error)

You will also need the new version fo the issue cover (themeing of the issue can be done in the theme/display-issue.tpl.php or by placing the file in your own folder inside theme/ and setting the folder name as the theme name in the journal edit form)

as to the workflow - I cant see time for it in the near future, but certainly you can do it off-site or combine some of the Drupal modules. Drupal definitely rocks and it could be done

I have also added the menu_rebuild and theme_registry rebuild calls into the uninstall(), so that is is now easier.

please let me know if the dev version fixes the problems

best,

matthew_ellis24’s picture

romca,
Thanks, the latest dev release fixed the cover issue, rebuilding the menus got me the author tab again. But the dev hasn't fixed the CCK conflict. I tried the debug code here http://drupal.org/node/362799 but it doesn't produce the extra debug output. These seem relevant but I'm not sure how to act on them
http://drupal.org/node/374056
http://drupal.org/node/319042

romca’s picture

I was reading the links, but we need more info - will you please add this to the cck, just before the line 1278?

echo "<pre>";
    var_export(debug_backtrace);
echo "</pre>";

There will be a lot of output probably, please try to identify the place in the ejournal that preceeds the call(s). Or you can post the whole thing at my mail.

Which version of cck are you using?

Thanks,

matthew_ellis24’s picture

Just outputs 'debug_backtrace'. Using CCK 2.2

matthew_ellis24’s picture

Version: 6.x-1.0-alpha3 » 6.x-1.x-dev
romca’s picture

this will do:
var_export(debug_backtrace());

matthew_ellis24’s picture

Hi, in the end I got the output by using var_dump instead of var_export. I'm not sure which bit I need to be looking at so I've sent the whole lot to you. Hope it's useful!

romca’s picture

Thanks for the debug output, I believe to have found the source of the error. The template was trying to theme an empty node, the template was ok, but I forgot that in the preprocess function I initialized it with (object)array().
Please test out the dev version of the ejournal.module. That should fix it.

matthew_ellis24’s picture

unfortunately that doesn't seem to have had any effect.

bomarmonk’s picture

I am still having the first error you mention: "warning: Invalid argument supplied for foreach() in /home/carabusonline/coleoptera-international.co.uk/sites/all/modules/cck/content.module on line 1278." I have updated to the latest development version of E-journal as of 4/26/2009, but the error persists. I reported this error (http://drupal.org/node/351434) long, long ago, and I'm wondering if you have found a way around it? I'm not sure. My issue was apparently not addressed because I didn't change the status back from "developer needs more information" to "active," although I have continued to update the issue with more information. If either one of you can help me fix this, I would greatly appreciate it! The other thread has everything I have tried to fix the problem.

matthew_ellis24’s picture

Latest dev release fixes this issue for me, many thanks Romca.

bomarmonk, try the latest dev release as well (27/4/2009). If that doesn't work I imagine the best thing to do would be to let Romca know which version of CCK you are using and insert following debug code at line 1270 of the CCK file content.module, then refresh the page you are getting the error on and send romca the output.

echo "<pre>";
var_dump(debug_backtrace());
echo "</pre>";
bomarmonk’s picture

I'll give that a try! Thank you.

bomarmonk’s picture

Well, one day makes all of the difference. The 4/27/2009 development version fixed the problem for me. Thanks!

romca’s picture

Status: Active » Fixed

uhh, aah! thanx! I was wondering what else I could do ;-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.