Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'm using Drupal 6.9
I setup Content Profile. when I want to change things in the profile, I don't see a "save" button ???
really funny. pls help me.
Comment | File | Size | Author |
---|---|---|---|
#29 | show_save_button-366397-29.patch | 784 bytes | firebus |
Comments
Comment #1
fagoWhere exactly do you try to edit your profile?
Can you reproduce the problem on a clean install with just content profile?
If not, try enabling modules until the problem comes back. So identify the module causing the troubles.
Comment #2
Summitt Dweller CreditAttribution: Summitt Dweller commentedI just posted a new forum topic for this as I'm experiencing the very same problem.
Comment #3
Summitt Dweller CreditAttribution: Summitt Dweller commentedOK, I now have a new, clean 6.9 installation with only CCK and Content Profile having been added to the mix thus far. The CP form is working...the SAVE button is visible and appears to function properly.
So, if I understand correctly, fago's recommendation is to start adding modules back in to see if/when the SAVE button breaks again? I have a lot of modules activated (and formerly activated) in my broken configuration. Any suggestion which ones might cause this kind of problem?
Comment #4
Summitt Dweller CreditAttribution: Summitt Dweller commentedI have an assistant ready and waiting to input some user profile data for me so I find I'm having to move on this ASAP. Still don't have CP working in my target production environment but I'm also unable to break it in my test configuration.
In that test environment I have thus far enabled Profile (the basic Profile content type) as well as nearly all CCK options and a whole host of other modules. Still the test environment shows me a SAVE button and works without any apparent problems. I even tried enabling Profile, adding some Profile content then disabling that module...no problem.
I know PHP and have written some of my own code for custom blocks, etc... however, I don't have a clue where to look in the code to see what might cause the missing SAVE button in CP. Any guidance in that regard would be most welcome.
Thanks.
Comment #5
drupallogic CreditAttribution: drupallogic commentedI solved it. The problem is when you don't allow direct submission and ask for a pre-look before submitting, save button disappears! so just alllow direct submission to users.
Comment #6
andreiashu CreditAttribution: andreiashu commentedAccording to what drupallogic says this is not a bug.
@Summitt Dweller can you tell us if #5 solved this problem ?
Comment #7
drupallogic CreditAttribution: drupallogic commentedno! this is certainly a bug and should be corrected.
Comment #8
vitamink CreditAttribution: vitamink commentedI have exactly the same problem... profile edit page has no save/submit button.
Drupal logic - i've tried to follow your solution but am having trouble, any chance you could be a bit more explicit?
"don't allow direct submission" - is this a permission i'm missing somewhere?
thanks in advance
Comment #9
drupallogic CreditAttribution: drupallogic commentedyes users must be able to save instead of first previewing. if user needs to preview before submitting, then save button disappears.
Comment #10
jacobson CreditAttribution: jacobson commentedThis is exactly the problem and does seem like a bug. FYI, even when the Save button is not visible, hitting enter does "save" the form and the data that's been input.
Comment #11
dsms CreditAttribution: dsms commentedi got the same problem and I suggested to make a preview-button available to user-profiles too...
>> http://drupal.org/node/436848
but no maintainer answered!
Comment #12
pimok3000 CreditAttribution: pimok3000 commentedHi, I´m using the dev Version from today with v6.10 and can confirm this problem to appear, but the option to simply hit ENTER fails with my setup.
in user/1/edit i find these 3 input-types="submit" and the buttons show correctly:
in user/1/profile/edit i find only these 2 input-type="submit" and the save/cancel buttons don´t show up:
So in user/1/profile/edit those two buttons are missing in the generated soucre code:
What is a possible reason for this issue?
Comment #13
Summitt Dweller CreditAttribution: Summitt Dweller commentedSorry for not posting a reply much earlier...got caught up in other issues and had this one resolved so I didn't even notice the replies.
Problem is, I'm not exactly sure what steps enabled me to resolve this. 8^( Does one have to leave the core Profile module enabled in order to successfully run Content Profile? At one point I thought maybe that was the problem... I had core Profile working, disabled it, then installed Content Profile and it didn't work. Eventually I think I found that core Profile had to be enabled to make Content Profile fully functional. Unfortunately I can't even check the status of my site modules now because I've hit my hosts process memory limit and can't get the admin/modules screens to open anymore. Porting to a new host soon (fingers crossed) to get past this little headache.
Comment #14
TomSherlock CreditAttribution: TomSherlock commented@Summit Dweller
@fago
I too have encountered the "no save button" phenomenon.
It seems that setting the profile form as a content profile for users causes the buttons to disappear.
Comment #15
skizzo CreditAttribution: skizzo commentedI had no problem before with 6.x-1.0-beta3, but then I started experiencing the OP problem... not sure what caused it.
The problem persisted with 6.x-1.x-dev (using either the core Profile content type, or a brand new content type). As a workaround I disabled force preview in admin/content/node-settings, which unfortunately applies to ALL content types... I have not been able to identify another module as the cause of this problem.
Comment #16
intent CreditAttribution: intent commentedAfter a little investigation, I think I uncovered the problem and a potential solution.
It would appear that line 263 in content_profile.module forcefully eliminates the "Preview" button on any node identified as a content profile type. This makes sense because nodes that are acting as content profiles are not typical nodes and a preview of content profile edits is unnecessary.
Unfortunately, this prevents the display of any button at all when preview is set to be required, because no Save button will appear on the initial edit page.
What I did, and it seems to work for me though I haven't thoroughly tested yet, is to add the following line of code directly above line 263:
This then forces the display of a Save button on content profile pages.
Again, so far this seems to have worked for me, but needs more testing. Also, I am far from a pro php programmer, so please take this suggestion with the appropriate grain of salt. Still, thought I should post in case it helps anyone.
Comment #17
pimok3000 CreditAttribution: pimok3000 commented@skizzo i can confirm that changing the preview to "optional" brings back the "save" button after doing the changes at admin/content/node-settings
Comment #18
TomSherlock CreditAttribution: TomSherlock commentedAfter creating a new website with Drupal and installing the bare minimum of contrib modules to get content profile installed, i have noticed that when i
activate the option 'Use this content type as a content profile for users', i am unable to see the 'preview' and 'delete' buttons. When i deactivate this option the buttons reappear. I have been able to reproduced this behavior consistently.
@intent
I haven't gotten to the point yet of proposing a solution, however i have noticed that in the function content_profile_form_alter the following:
which may be the code you were referring to.
The only other code that explicitly refers to ['buttons']['preview'] is node.pages.inc in the node_form method.
Comment #19
intent CreditAttribution: intent commentedYes Tom, the code in content_profile.module is the code to which I'm referring.
FWIW, upon adding the extra line I mentioned above, I have experienced no issues and everything is now working.
Comment #20
TomSherlock CreditAttribution: TomSherlock commentedThat's good to know, intent. However, i'm trying to understand what's happening under the covers.
I'm debugging the code in Eclipse, using xdebug to set break points. Any suggestions as to where to set the breakpoints for content_profile?
My concern is that the module does not force the display of the 'save' button, because it is depending on core modules to do.
Adding your code could conceivably create unintended redundancies, notwithstanding your encountering no issues with your code.
I'm trying to locate the code that inserts and displays the buttons for '/node/add/profile', 'node/###/edit' and '/user/#/edit/profile'.
Suggestions are welcome.
Thanks.
Comment #21
fagoHow can I disallow direct submission? To fix this, we need to display the preview button if the save button is already hidden.
Comment #22
TomSherlock CreditAttribution: TomSherlock commented@fago,
it appears that you question is a response to my comment:
"My concern is that the module does not force the display of the 'save' button, because it is depending on core modules to do."
If so, i'm confused by your question. I'm trying to understand the logic and intent (no pun intended) behind the code in content_profile. I don't understand it enough to give it a fair critique. (Unfortunately, my confusion is compounded by the fact that i am becoming reacquainted with the eclipse IDE and am trying to understand xdebug)
When trying to view the profile (/user/#/edit/profile) of a user from the user account page i notice that i start in content_profile_page_edit() and end up in node.pages.inc.node_form() for the buttons save, preview and delete. Access for the save button is set to 'false', the preview button's access property isn't addressed and the code for the delete button is not executed.
In content_profile.content_profile_form_alter(), i took intent's suggestion (#16):
What i see displayed on the resultant screen is the save button only. And yet content_profile's function content_profile_form_alter() is not invoked.
What am i missing here?
@fago, back to your comment: i'm not sure what you mean by disallow direct submission. Do you mean not to explicitly code for the save button in your module?
It's not clear to me why the save button is intended to be hidden (as node.pages.inc.node_form() appears to do). Drupal.org's comment page shows both the save and preview button.
Again, without understanding the logic and intent behind the code of profile_content, i would normally expect save and preview buttons for a node in edit mode that has yet to be saved (i.e. created). I would expect save and delete buttons for an existing node that is being edited. Perhaps even the preview button could be added as a third button?
Comment #23
TomSherlock CreditAttribution: TomSherlock commentedI don't understand the connection or lack of connection between
content_profile's content_profile_page_edit(),
node.pages.inc's node_form(), and
content_profile's content_profile_form_alter() with regards to the buttons.
Tracing the code, i can see that content profile's content_profile_page_edit() eventually dips into node.pages.inc's node_form(), which creates the save, preview and (conditionally) delete buttons.
I don't understand why the buttons do not show up on the page after being created. Is there some other code which shuts off the buttons? Or must all buttons have their access attribute turned on? Does the form's #redirect attribute influence the buttons?
As far as i can tell, writing something such as
from content_profile_admin_settings() should be sufficient for the button to show.
I've also noticed that setting the preview button's #access attribute to TRUE in content_profile_form_alter will be changed to FALSE somewhere else in the code.
Comment #24
mhunt CreditAttribution: mhunt commentedI wanted to make a note here that you can change this here: admin/content/node-settings "Must users preview posts before submitting?" In my case the save button was removed on all node types, not just the content profile node type. This is the content access module setting that was causing this for me.
Comment #25
skizzo CreditAttribution: skizzo commentedHas anyone found a fix for this issue?
In order to bring back the Save button I set "Preview post" to Optional but now...
a) node/20620/edit?destination=user/32 : I see both Save and Preview buttons
b) user/32/edit/myprofile : I see the Save button only (no Preview button!)
note: URL a) is reached when entering node/add/myprofile (profile node may or may not exist already)
Comment #26
shunting CreditAttribution: shunting commentedIf you want to disallow direct submission, why not make sure the link to instantiate the content type doesn't appear on the menu, so the user can't get at it?
Or perhaps detect that the request to build the submission form came from the user profile page (the original) by the URL, and grey out the buttons with a note if the request comes from anywhere else?
#17 worked for me. I now have a Save button. This is a frustrating issue, especially since it crops up when you're all excited about saving your first profile...
Comment #27
gallamine CreditAttribution: gallamine commentedAny progress on this? I don't want to allow direct submission of nodes (I want to force a Preview), but that makes the "Save" button on Content Profiles disappear.
Comment #28
skizzo CreditAttribution: skizzo commentedChanging status so that solution #16 can be taken into consideration for next official release.
Comment #29
firebus CreditAttribution: firebus commentedHere's a patch that implements the suggestion in #16
Comment #30
my-family CreditAttribution: my-family commentedsubscribe