rcain
Forum Replies Created
-
I have precisely the same problem using latest version wordpress + latest version this widget (v3.3.4). problem occurs when using either ‘filter by date’ or ‘search’ functions in the ‘select from media library’ tab.
(retesting shows prob also existed on v3.2.11)
anyone worked out a fix?
Forum: Fixing WordPress
In reply to: File uploads and WP_Filesystemhi, i have just come across this same problem trying to get the bp-my-home plugin to work.
i haven’t got to the bottom of it yet. any ideas anyone?
Forum: Plugins
In reply to: [BP My Home] [Plugin: BP My Home] Oops, error while unzipping!some further info regarding this problem:
1) checking what it had and hadn’t done:
– directories:
/httpdocs/wp-content/uploads/bpmh-widgets
/httpdocs/wp-content/uploads/bpmh-widgets– created ok, BUT have perms only 766 whereas all other subdirs in upload are set at 777.
this may or may not be a problem.
2) tracing though the code:
file: bp-my-home-admin.php,
function: bpmh_unzip widget– last line – return from call to wp unzip_file is:
error message = “Incompatible Archive”
error: code = incompatible_archive
error data = PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘/var/www/vhosts/mysite.com/httpdocs/wp-content/plugins/bp-my-home/zip-widgets/’so it looks like it has some sort of permissions problems copying across zip files into the directory the plugin has created for itself.
– maybe related to the way my system is set up, but possibly a bug anyway?
PS. you can find my complete modified code here: http://pastebin.com/RVBQ7icG
you may also be interested in this post concerning import of attachments (using plugin http://wordpress.org/extend/plugins/wordpress-importer/ ) here: http://wordpress.org/support/topic/plugin-wordpress-importer-not-importing-any-images-at-all (esp my notes concerning export/import of multiple batches).
and my modified code for that plugin – here: http://pastebin.com/Xx7Sj7vN
oops!: that last link should have been – http://pastebin.com/Xx7Sj7vN
PS. you can find my complete modified code here: http://pastebin.com/RVBQ7icG
you may also be interested in this post concerning import of attachments (using plugin http://wordpress.org/extend/plugins/wordpress-importer/ ) here: http://wordpress.org/support/topic/plugin-wordpress-importer-not-importing-any-images-at-all (esp my notes concerning export/import of multiple batches).
and my modified code for that plugin – here: http://pastebin.com/RVBQ7icG
Forum: Plugins
In reply to: [Plugin: WordPress Importer] Not importing any images at allOK.
I”ve modified this plugin to fix most issues with import of images (attachments).
you can find my modified code here: http://pastebin.com/Xx7Sj7vN
(diagnosis is pretty much as i described in the post above).
points to note:
1) you must make sure you have actually included image attachments in any original export (read the documentation).
2) you must make sure you choose to import attachments (tick box in step 2 of import process)
3) if you are exporting/importing in multiple batches (say because a single batch gets too big and truncates), you MUST also ensure that:
a) you import ALL normal posts BEFORE importing any attachments
b) you should import ALL attachments as a single batch file, if at all possible.you may also find my modified version of the advanced-export-for wp-wpmu plugin useful. my modified code can be found here: http://pastebin.com/RVBQ7icG
(see also: http://wordpress.org/support/topic/plugin-advanced-export-for-wp-wpmu-how-to-export-attachments-only, http://wordpress.org/support/topic/plugin-advanced-export-for-wp-wpmu-eliminating-superfluous-cat-and-tag-records-from-posts-only-exports)
hope this helps.
Ipstenu – sure. sorry about that – ordinarily i would have used pastebin, but thought i’d get away with 20 lines odd. good to know the reason though.
Antrea – good suggestion – i’ll give it some thought – pretty up to my eyes in work at present (on data import in fact), but will certainly give it a look over when i’m finished.
all the best.
Forum: Plugins
In reply to: [Plugin: WordPress Importer] Not importing any images at alli am having exactly the same issue also.
however, i am part way through analysing it and resolving it. a number of issues/bugs determined so far – albeit they may be peculiar to my particular environment.
issues found so far:
1) i was using the ‘advanced exporter for wp wpmu’ plugin (http://wordpress.org/extend/plugins/advanced-export-for-wp-wpmu/) to export posts from wp (mu) V2.7 to WP 3.3.1.
selecting only ‘posts’ to export prevented it from exporting ‘attachments’. (selecting export ‘all’ did export some attachments, but bombed out since my database was too big, leaving a corrupt/truncated export file – again, no error messages were produced)
solution: i modified/extended the plugin to enable export of ‘attachments only’.
(i will post details of my fix up on the relevent plugin page when i can).
2) from my old WP installation had ‘some’ attachments with relative url’s producing export tags of the form:
<wp:attachment_url>files/2009/12/myfile.jpg</wp:attachment_url>note: no leading ‘/’ character
whereas most others had explicit url’s of the form:
<wp:attachment_url>http://mysite.com/files/2009/12/myfile.jpg</wp:attachment_url>during subsequent these are picked up my wordpress-importer.php function process_attachment which mis-treats the first kind and as a result fails to load image files in from the remote url (which is malformed).
as i recall, no error message is returned (unless you turn debug on).
solution here:
file: wordpress-importer.php
lines: around 821changed from:
... if ( preg_match( '|^/[\w\W]+$|', $url ) ) $url = rtrim( $this->base_url, '/' ) . $url; ...changed to:
... if (!(stripos($url,'http://') === 0 || stripos($url,'www.') === 0)) { if (strpos($url,'/') === 0) { $url = rtrim( $this->base_url, '/' ) . $url; } else { $url = $this->base_url . $url; } } ...– this seemd to work (mostly) – in that it actually loaded in my attachment image files from the remote server and showed them in the media library.
3) image url’s within post content are still not getting converted properly to the new paths. (although, curiously anchoe links sorounding the image tags do get converted).
this is the bit i am trying to fix at present.
part of the problem is that i am having to load my content in many small batches; the plugin runs a function backfill_attachment_urls intended to update any urls in content, BUT, the array it uses to do the mapping from old url to new url is ONLY created when importing attachments – thus is sensitive to the order in shiich i run my batches.
an additional problem i’ve spoted (i think): around line 849 of wordpress-importer.php, function process_attachment (again), currently reads:
... // remap resized image URLs, works by stripping the extension and remapping the URL stub. if ( preg_match( '!^image/!', $info['type'] ) ) { $parts = pathinfo( $url ); $name = basename( $parts['basename'], ".{$parts['extension']}" ); // PATHINFO_FILENAME in PHP 5.2 $parts_new = pathinfo( $upload['url'] ); $name_new = basename( $parts_new['basename'], ".{$parts_new['extension']}" ); $this->url_remap[$parts['dirname'] . '/' . $name] = $parts_new['dirname'] . '/' . $name_new; } ...– this is the bit concerned i think (when eventually i can work out how to make it run at the proper occassion/step in my batches).
one further problem here appears to be the call to
pathinfo($url)– pathinfo – requires a file path BUT here it is being passed a url – entrirely the wrong format/usage.
part of solution (i think) is to use the parse_url function FIRST, then pathinfo on only the relavent (path) element.
in the middle of modding/testing all this at present, but need some sleep first. will update here when i discover more.
hope this helps give someone else a head start.
a few words from the developer would be a great help at this stage – if he’s about?
OK.
I’ve solved the second question at least: answer is to use the old ‘advanced export plugin’ :
http://wordpress.org/extend/plugins/advanced-export-for-wp-wpmu/
– allows exclusion of categories, tags, pages, etc – enabling posts only to be exported.
note: this plugin also solves another problem i discovered where native export was truncating the export file at around 10MB.
(don’t yet know whether they’ll import ok – i shall find out soon enough).
hope this is a help to someone sometime.
have to agree – this plugin appears totally broken – displays search button and clear all button, but NO drop-downs in widget bar.
shame – wordpress needs something like this for multi-selects.
pps. on second thoughts, you will probably want:
height="auto"in the short code params, and set the css height hard, as you have. sorry, its late. best of luck.
ps. you may also need css for::
min-height: max-height:../width
errata: typo in post above – should have included
overflow-x:hidden;/visible as well, depending on what you want.hi triplwu,
its nothing, you are welcome, glad if it helped. we have woodent to thank for the thing.
re. your question: well, if one dimension changes, and the other dimension remains fixed, then ‘something’ has to give. you could either:
a) accept some ‘squishing’ in one dimension, but keep the whole of the image ‘in-frame’ (albeit ‘somewhat’ distorted).
or
b)accept that part of the image will become truncated/cropped (horizontally, at the bottom, in your case), when the browser/container size changes.
this will give the appearance of a ‘zooming’ effect (though you will lose/gain detail of the bottom of the picture).
you ‘might’ also need to ensure the image doesn’t shrink below a certain size. again, it all depends again on your design and is also browser dependent.
i guess it is the second outcome you want to achieve.
the css file i attach above should almost do what you want already. you will need to set a ‘hard’ HEIGHT parameter and a ‘variable’ WIDTH parameter short-code options. eg:
[promoslider id="my_id" post_type="promotion" category="promo test cat 1" display_excerpt="excerpt" width="100%" height="300px"]then i think you will need to experiment with combinations of css::
overflow:hidden; overflow-y:hidden; overflow-y:hidden;for the styles:
.promo_slider_wrapper .promo_slider .promo_slider .panel… maybe others. if you have problems also try to use ‘absolute positioning where possible, avoid floats if you can (set float:none;), the usual cross browser malarkey.
then, test, test, test
good luck
ps. … oops sorry – one more file changed to add to the two pastebins above::
index.php :: http://pastebin.com/yDY1Z6tZ – NOTE: look for my mod marks ‘mod jrc …’ – 1 small mod only to pass in options properly to js.