Forum Replies Created

Viewing 11 replies - 46 through 56 (of 56 total)
  • Thread Starter saas

    (@saas)

    Hi Paul,
    Thanks for fixing it and releasing an update quickly. I will test it and let you know if it works for me or not.

    Sure I really liked your plugin and I am even considering about enhancing it, I use github and was wondering if you could host it their so I and others can contribute to this fine work of yours.

    Thanks,
    Syed

    I had same issue, and I used your fix and it solved the issue. So I would like to see this fix in core????

    Developer reading????

    Hi candy2012,

    I was also unable to find any template tag or such.

    So I hacked the code,

    I used this:
    echo do_shortcode('[mappress]');

    what it do is,

    // Determine what to show
    		$mapid = (isset($atts['mapid'])) ? $atts['mapid'] : null;
    		$meta_key = $options->metaKey;
    
    		if ($mapid) {
    			// Show map by mapid
    			$map = Mappress_Map::get($mapid);
    		} else {
    			// Get the first map attached to the post
    			$maps = Mappress_Map::get_post_map_list($post->ID);
    			$map = (isset ($maps[0]) ? $maps[0] : false);
    		}

    looks for mapid passed to shortcode if found none then looks for any attache maps to current post and show / display it.

    hope it helps you.

    Note: this is not an ideal solution but works for now, hoping developer will provide elegant solution soon.

    Syed

    saas

    (@saas)

    Its a golden rule (mine :D), whenever you see

    Fatal error: Allowed memory size of ___________ bytes exhausted (tried to allocate _______ bytes) in some_file_path.php on line some_line_number. Always first check your php memory allocation size, most of the hosting providers have set it lower ( then wordpress needed / minimal requirement), specially on shared hosting. So if you can increase the memory size first try that and it will save you hours and sometimes days of headache.

    Hope that helps at-least a couple of WordPress users if not all.

    Thread Starter saas

    (@saas)

    ?? Its fixed now. I have get the source from github & upload it and it fixed the issue. And I found you have fixed it a week ago. And its working for me. I will appreciate if you update the wordpress plugins repository as I am sure there will be lots of guys like me having this issue.

    Thanks for fixing it.
    Kind Regards,
    Syed

    Thread Starter saas

    (@saas)

    The second area where the https links are forced to http

    function fixLinksAndForms();

    else if ($this->getPlugin()->isUrlLocal($url) && ($post = get_page_by_path($url_parts['path']))) {
                    $post = $post->ID;
                    //TODO When logged in to HTTP and visiting an HTTPS page, admin links will always be forced to HTTPS, even if the user is not logged in via HTTPS. I need to find a way to detect this.
                }

    so both the normalizeElements & fixLinksAndForms are causing issue for me

    I modified the normalizeElements as per this code

    if ($this->getPlugin()->getSetting('exclusive_https')) {
                                  $this->_html = str_replace($url, $this->getPlugin()->makeUrlHttps($url), $this->_html);
                                 } else {
                                $this->_html = str_replace($url, $this->getPlugin()->makeUrlHttp($url), $this->_html);
                                }

    but not sure how I can fix the above fixLinksAndForms code????????

    I will appreciate if you let me know or I will have to digg more ?? I have already spent too much time on this. Hope you have the answer quick.

    Thread Starter saas

    (@saas)

    I have further investigated it & found out your this logic doesn’t make any sense

    $this->getPlugin()->makeUrlHttp($url)????????????? why???????????
    
    $matches = array_merge($httpMatches, $httpsMatches);

    this gets me all https links

    and you are forcing all those to be http???????

    Shouldn’t it considered either Force SSL Exclusively ????? if its set to yes then it should not convert to http.

    Like if it set to true it should have converted all none http to https
    or if false

    converted all https to http.

    if ($this->getPlugin()->getSetting('exclusive_https')) {
                                  $this->_html = str_replace($url, $this->getPlugin()->makeUrlHttps($url), $this->_html);
                                 } else {
                                $this->_html = str_replace($url, $this->getPlugin()->makeUrlHttp($url), $this->_html);
                                }

    I modified like this and now I have got partial http & https links (means mix) if I comment the normalize function all of my links are https.

    Can you explain the original logic of normalize function so I can be of help????

    Thread Starter saas

    (@saas)

    I am trying to use

    Force SSL Exclusively ??? I set it to checked. But It still normalize my https links (which they are as I have set my home url & site url to https).

    But in normalizeElements()

    you are checking for “ssl_host_diff” value which is hidden value

    <input type=”hidden” name=”ssl_host_diff” value=”<?php echo (($this->getPlugin()->getSetting(‘ssl_host_diff’) != 1) ? 0 : 1); ?>” />

    So I suppose it should have either be available in settings or Force SSL Exclusively should have been considered to making decision whether to go for http or https????????????

    What are your thoughts?

    @mvied good. ??

    @mvied, I am confused about this code, though you have solved the array issue, but the merge logic is correct?

    $matches = array_merge($httpsMatches, $httpsMatches);

    Shouldn’t it be like

    $matches = array_merge($httpMatches, $httpsMatches);

    OR

    $matches = array_merge($httpMatches, $httpMatches);

    ??????????

    @olivier its fixed in version 3.0.3.

Viewing 11 replies - 46 through 56 (of 56 total)