Download & Extend

User cant create their Content Profile

Project:Workflow Fields
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:critical
Assigned:infojunkie
Status:closed (fixed)

Issue Summary

I am trying to get workflow fields to work with a Content Profile content type.

For existing content it works just fine, but I simply cant get it to work when a user is creating their content profile. The only things that shows in the for is the Title, non editable, and empty vocabulary and workflow fieldgroups.

Even funnier, the site have a Content Admin role. That role can go to a user profile page and create the content profile for that user without any problems.

To make sure it was not a permission problem I gave the user exactly the same permissions as the Content Admin, but that didn't change anything.

In the Creation I have ticked every checkbox just to test, but still the same result.

I have tried everything I can think of to get this working, but it simply wont work...

I have the Workflow Access module enabled. Should I disable it and Workflow Fields will instead be used? I can't find any documentation about if they conflict or not, but it seems to me they are doing the same thing?

Comments

#1

Assigned to:Anonymous» infojunkie

Thanks for your report. I'll try to reproduce the problem using Content Profile.

#2

Thanks Karim, if there is any way I can help you debug this, please let me know. Personally I found it quite odd :)

#3

Oki, got some more info for you that might help tracking down this problem.

I was a little wrong when I said that the content admin/UID 1 could create new nodes without problems. The whole form was viewed and I simply assumed it would work since the user only saw a non selectable title field.

However, I have now added a few new nodes as UID 1 and the following problems occurs when workflow fields is enabled.

  • Title field is not possible to edit, it is the Drupal Core title field. All other fields added using CCK works just fine. I have disabled the Body std field and using a CCK textarea field instead.
  • The Authored by field has the user name filled in when creating the node, but it is not saved, so when opening it up for editing it is blank
  • Published was ticked, but the node was still saved unpublished
  • The Authored on: is saved as 1970-01-01 01:00:00 +0100 if left blank

All of the above can be fixed by going to the content list and edit the node.

Once the node is properly updated the author is able to edit it. Thus it seems all these problems are related to the creation stage in the workflow.

When I save a new node I get the following errors (not sure if they are all related to workflow fields):

* warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in [path]/includes/database.mysqli.inc on line 323.
* warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in [path]/includes/database.mysqli.inc on line 323.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.
* warning: mb_eregi_replace() expects parameter 3 to be string, array given in [path]/sites/all/modules/pathauto/pathauto.inc on line 184.
* warning: preg_match() expects parameter 2 to be string, array given in [path]/includes/bootstrap.inc on line 771.

When updating the node I get this one:

warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in [path]/sites/all/modules/workflow/workflow.module on line 270.

I hope this will help you debug this problem.

#4

Noticed one more thing.

When WF is disabled the workflow fielgroup shows the stages UID 1 can save the new node in. When WF is disabled it is completely empty.

I am using the latest official releases of Workflow and Workflow Fields 6.x-1.1 in both cases. I notice that Workflow 6.x-1.1 was released 6 days after Workflow Fields 6.x-1.1. Could it be that they changed something that made Workflow Fireld not work correct?

I haven't tried the dev version yet. I will do so now and see if that fixes the problem.

#5

Version:6.x-1.1» 6.x-1.x-dev

OK, have now installed and updated to the dev version.

The stages are now showed when creating new nodes, but other than that it is still the same as described above.

This is a major issue for this site and I would be very grateful if you could look into this.

#6

@edde42, on my own content type (not a content profile) I was not able to reproduce the problem with the creation state. Can you please let me know if the same problem occurs with with content types? Also, did you try turning off the Workflow Access module?

#7

I haven't tried turning of the workflow access module yet. Will do so now.

#8

Same thing with workflow access turned off.

Will create a new workflow and content type to use it on now.

#9

I created a new content type, but did not add any fields, just saved it. Worked. I then turned on Content Profile for it and it still worked.

I have also tested with turning of content profile for the content type I have problems with, but it still had the same issues.

I also turned of workflow for the problem content type and it still had the same problem.

Only time I get it working is when I disable workflow fields.

I have also flushed caches between all tests and so on.

I have also uninstalled workflow access to clean out its settings etc., but to no help.

This is driving me nuts :(

I initially, before workflow fields, tried using workflow with the revisioning module, but due to the complexity it added for the authors and also for editing non workflow content I had to ditch that.

Starting to think there might be some remains in the tables from revisioning that is causing these problems. I did disable revisioning properly. I don't remember if that module had an uninstall option or not. If it had I did ran it as it is not in the uninstall list.

I will try and compare the db tables for the config of both the old and new content type ans see if I can spot any differences.

#10

Oki,

I spotted one problem in the workflow_fields table.

For the title field in the problem content type the editable_roles for sid 4 (Live) was empty. I simply changed it to 3 (Content Admin role) and it worked for creating new nodes for UID 1 (which also has Content Admin role ticked). I can't really understand why that should affect the creation state, also in the workflow admin UI for creation it was ticked before.

I then tested creating that content type, I had changed back all setting including Making it a Content Profile again, and UID could create new nodes without glitches.

I then logged in as a user that can create new nodes of these two types. The problem there remains, the user does only see an uneditable title field for the old content type.

Same with the new content type, the user can not edit the title. I use FCKEditor for the body and I could enter text. The new node was created, but the text in the body was not saved.

So I have got rid of some of the problem, but the main problem with that authors can't create new nodes.

#11

OK, I have found the problem and this explains everything.

It all boils down to my workflow issue #431224: Wrong initial state for new nodes. As soon as I gave the author Visible and Editable editable rights in live the creation form is viewed and works exactly how it should.

Well, it does not work exactly as it should since I don't want the author to be able to change anything in Live, but at least I have found out that this problem has nothing to do with Workflow Fields. I will take it back to the Workflow module.

However, the db problem described above is in the workflow_fields table. Unfortunately I can't say which module is at fault there.

#12

Great detective work edde42! I'll follow your logic and and check why the workflow_fields table might be corrupt. Thanks for hanging in there!

#13

Hi Kratib,

Quite pleased with myself finding that one out :)

You might want to read #431224: Wrong initial state for new nodes, mentioned in my comment above, as it is related to the problems I had. Workflow left some garbage in my db tables as well which caused Workflow Fields to think every new node was in state Live.

I had a good day Yesterday cleaning out my db's lol.

Sorry for thinking it was Workflow Fields that was the problem, but I believe that you agree with me it was logical to think so as everything worked fine with WF disabled but not when enabled...

#14

Status:active» closed (fixed)

If I understand correctly, this isn't a WF issue.