gpspake
Forum Replies Created
-
I guess I’ll go ahead and resolve this.
Sorry, should have resolved this. ADI is working great! Thanks.
If it helps any, here are the differences in the selection source for the ‘Add Media’ button.
Add New Post in WordPress Admin (Backend)
<div id="wp-content-media-buttons" class="wp-media-buttons"> <a href="#" class="button insert-media add_media" data-editor="content" title="Add Media"> <span class="wp-media-buttons-icon"></span> Add Media </a> </div>
Add New Post in WPUF (Frontend)
div id="wp-new-post-desc-editor-tools" class="wp-editor-tools hide-if-no-js"><div id="wp-new-post-desc-media-buttons" class="wp-media-buttons"> <a href="#" class="button insert-media add_media" data-editor="new-post-desc" title="Add Media"> <span class="wp-media-buttons-icon"></span> Add Media </a> </div>
I’m having some trouble with this.
I want users to be able to click on ‘Upload Media’ and insert images in to the post.To get the ‘Add Media’ button to appear on the add-post and edit-post pages, I granted subscribers the ‘upload_files’ capability with the User Role Editor Plugin and I enabled ‘Rich Text(Full)’ in the WPUF settings. When a subscriber logs in and clicks on the “Add Media’ button, the WordPress media upload interface appears. If the subscriber then clicks ‘Select Files,’ browses to media on his or her computer, and clicks ‘Open,’ they receive an error message where the picture thumbnail would be.
It took me a minute to figure out what was happening but I noticed that the button at the bottom of the add media interface, instead of saying ‘Insert into Post,’ says ‘Insert into Page.’
I went back to User Role Editor and granted subscribers three more capabilities: edit_pages, edit_others_pages, and edit_published pages. Once these capabilities have been granted, subscribers can upload media and insert it directly in to the post.This tells us that, for some reason, the when the add media button is clicked on the WPUF add-post or edit-post pages, the WordPress media uploader is associating the media with the page itself rather than the post. When the Insert into Page button is clicked, thie image is inserted in to the WPUF post description; the user can save the post and they have effectively inserted a picture in to the post.
There are at least a couple of major issues here.
Obviously, granting subscribers these capabilities is not an option as it gives them the ability to edit actual pages if they know the page id. Also, because the images are associated with the page itself, they appear below the WPUF form, on the add post and edit post pages as ‘WPUF-Attachments’ and are visible to all users.This is proving more difficult to figure out than I expected.
The solution is to make wp_editor’s Add Media Button recognize that the media is being added to the post description and not the page. However, I’m having a hard time figuring out where it’s being handled. Where is the ‘page id’ being passed to the media uploader, and how can we change it to be the ‘WPUF post ID?’Any ideas would be greatly appreciated.
The settings to enable the wysiwyg editor are in the plugin settings in the WP dashboard. They are under the “Frontend Posting” tab under “Content editor type.”
As I expected, It’s WP User Frontend. I’m going to resolve this and pick it back up in the wpuf support forum.
Hmm, sounds like it’s not finding the wpuf_forms table in your database which should be created when you activate Reigels plugin.
Try installing portable phpmyadmin plugin which lets you see your database from inside wordpress and see if you have that table in there. You may need to create it manually.
Forum: Networking WordPress
In reply to: The ol' redirect loop. Can't access dashboard.Wow. A response from the master. I’m not worthy.
Man what a headache.There are so many threads about this but it’s usually a multi-factor problem which makes it very difficult to provide any sort of definitive answer, but after about 30 minutes of going back and forth we realized that the working site had a second .conf file on the server that was added by the person who originally set it up. Now that we are enlightened to this fact it explains some separate issues we were having with that installation. whew.
Anyway, once we realized that there was another conf file on the working-site server, we were able to see what was going on and modify the one that wasn’t working.
So kids,
There’s no end all solution for this. It depends on your specific configuration and installation. (Also make sure you don’t have a .conf file or .htaccess file that could be impacting something else. The version you were on when you installed multisite is also a factor.
Always listen to Ipstenu, in the end, this codex page is the key.https://codex.www.ads-software.com/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite
Here’s how it came out.
<Directory /var/www/html/> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files #RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] #This will be different for multisites installed from 3.5 or later #https://codex.www.ads-software.com/Multisite_Network_Administration #should use next 2 lines #RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) wp/$2 [L] #RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ wp/$2 [L] #Currently started @ 3.4 so we need next 2 lines RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L] RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L] RewriteRule . index.php [L] #this section pushes all stuff into wordpress rewrite. # need to find a way to remove select subdirectories so that other things can be installed #RewriteRule !^(special(/.*)?|collector\.html)$ collector.html [R,L] </IfModule> # END WordPress </Directory>
Forum: Networking WordPress
In reply to: The ol' redirect loop. Can't access dashboard.Ok, so I uncommented this line and it’s sort of working
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
But now I have an even stranger issue. If I’m in the dashboard for the site I just added and I hover over ‘my sites’ only network admin and the primary site show up. If I’m in the primary site dashboard or network admin and I hover over it, I see both sites listed. This really isn’t to much of an issue but I think it could be indicative of some larger issue.
Wait,
I may have misunderstood you.
If you have multiple add post pages that submit a particular post type, the edit post page doesn’t matter.For instance, if you add a post with the type “toys” and another with the type “post” and you click on edit in their respective dashboards, you will be redirected to the same edit post page but the post type won’t change when you update it.
Well, I don’t think so. That’s something I’ve been struggling with. I think you’re essentially talking about multiple form functionality. The developer has mentioned that it would require some serious code revision.
Currently, you can have different add-post and dashboard pages, for different post types, but the form settings are going to be the same, meaning you can’t have one form that allows categories and attachments and another one that doesn’t.
Seeing as this is such a great plugin and that’s such a vital feature, I would expect it to be added at some point, if not by the developer, then by another user forking the plugin. Several people have expressed interest and I have started working a fork on github that I hope to solve this but I have no idea how long it would take to make it functional.
Oh, wait…
I forgot this is built in to the plugin. Try this…[wpuf_dashboard post_type=”toys”]
So, you definitely need separate dashboards? Would a single dashboard that shows all post types work for you?
Ok, It just realized how the fork handles this much better through the backend. Thanks professor99!
Does this work?
.wpuf-post-form li div { width:100% !important; }