All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

Please read about the changes to BoldMinded add-on licensing.

Ticket: Weird prefix redirect

Status Resolved
Add-on / Version Publisher 1.0.8
Severity Blocker
EE Version 2.6.1

Rein

Sep 09, 2013

Hi,

Just installed Publisher and add 2 languages (Dutch (default) and English).

I enable the prefix option and disable the draft option. When i visit a page (feramed.portalserver.nl/over-feramed), the page is showing up. When i add the prefix NL ‘feramed.local/nl/over-feramed’ the page still looks normal. But when i add the prefix EN (feramed.portalserver.nl/en/over-feramed) the page is redirecting to http://feramed.portalserver.nl/index.php/en/http:/feramed.portalserver.nl/en/over-feramed.

I`m using the normal way of hiding the index.php, so thats may not be the problem.

Another problem that popsup is that when i use {exp:publisher:switcher style="links"}, the links of the page go to some random template.

Sounds this familiar? If you need a login and test site, just let me know.

Regards,
Rein

#1

BoldMinded (Brian)

Rein, try 1.0.9. I just released it an hour ago and most of its changes were specifically for redirect issues like this.

What is “some random template”?

#2

Rein

Just downloaded the v 1.0.9.

Seems to working, but the {exp:publisher:switcher style=“links”} still not working. You can use the feramed.portalserver.nl/ to see whats happend when clicking on ‘nederlands’ or ‘engels’.

ps. you version number in your config is still 1.0.8

Rein

#3

Rein

And…. is there also a way to change the language in the CP. For example; when i visit structure and i want to change the language to see the titles in deutch. How can i accomplish.

#4

BoldMinded (Brian)

Rein, did you enter translations for all your languages?

Try not having your JS or CSS files served as EE templates. Move the files in your javascript group to assets on the server and link them normally. Running those through EE adds a lot of extra parsing overhead.

Unfortunately there is not a way to change the titles in the Structure list like that yet.

#5

Rein

Thanks, thats worked out.

I still got one question; is it possible that you look to the ‘Name of your site’s index page’ before you adding the index.php to the url.

Rein

#6

BoldMinded (Brian)

Yes, Publisher takes all those config variables into account to figure out the base url, which may or may not include index.php.

#7

Rein

But it include the index.php in the url… so it looks there might be a problem.

I got one more problem 😊 but i will post this in about a couple of minutes with url and login.

#8

BoldMinded (Brian)

If index.php is defined in the EE CP or your config.php file, then Publisher will include it. Check all your settings, it won’t include it if it doesn’t exist.

#9

Rein

Solved, somewhere in my custom config it goed wrong.

Last (i hope;-)) question: if you visit http://feramed.portalserver.nl/nl/medewerker and change the lang to en, it goes to an empty page. When i enable the template debugger i see it load the wrong template. instead of loading medewerker/overzicht, it load the medewerker/index template. But i select the template medewerker/overzicht for that page in the structure tab.

#10

Rein

Any chance to look into the problem above?

#11

BoldMinded (Brian)

Did you move the js and css files out of the EE templates?

#12

Rein

Yes

#13

BoldMinded (Brian)

I assume this is the issue you’re referring to? If so what pages can I see it happen on? I’ve been clicking around and changing languages and it appears to be working fine.

#14

BoldMinded (Brian)

Nm, I see your comment above, missed it the first time.

#15

BoldMinded (Brian)

I can’t see the template debugging output even though its turned on. Am I in the super admin group? If not mind adding me to it?

#16

Rein

And now?

#17

BoldMinded (Brian)

Yeah, thanks

#18

BoldMinded (Brian)

can you do me a favor? Open up the models/pubilsher_log.php file and replace the _format() method with this:

private function _format()
    {
        $log_data = array(
            'log' => $this->log_data,
            'settings' => ee()->publisher_setting->settings
        );

        $this->output = '<div class="'. strtolower($this->log_name) .'_log"  $this->wrapper_style .'">
            <fieldset  $this->inner_style .'">
                <legend  $this->legend_style .'">'. strtoupper($this->log_name) .'</legend>
                <table width="100%">';

        foreach ($log_data as $type => $data)
        {
            $this->_format_header($type);
            $this->_format_rows($data);
        }

        $this->_format_header('Site Pages');
        $page_data = array();

        foreach(ee()->publisher_model->languages as $lang_id => $data)
        {
            foreach (array(PUBLISHER_STATUS_OPEN, PUBLISHER_STATUS_DRAFT) as $status) 
            {
                $page_data['language: '.$lang_id .' status: '.$status] = ee()->publisher_site_pages->get($lang_id, FALSE, $status, TRUE);
            }
        }
        
        $this->_format_rows($page_data);

        $this->output .= '</table></fieldset></div>';
    }
#19

Rein

Done

#20

BoldMinded (Brian)

Would you be comfortable providing FTP access to this site so I can modify some Publisher files and debug? It seems to not be finding the translated page value, thus defaulting to looking for segments.

#21

Rein

How, can i send the credentials? I can`t edit this ticket…

#22

BoldMinded (Brian)

You don’t see a blue Edit button at the top? If not you can email it to support@boldminded.com

#23

Rein

Yes, but the values for “Support Request Type” is empty and is required. So i can`t submit the form… is there a emailaddress?

#24

Rein

nm, see the address

#25

Rein

you got mail

#26

BoldMinded (Brian)

Yep, will take a look shortly.

#27

BoldMinded (Brian)

Rein, should be fixed now. I also ran it through my selenium tests on 2 other sites and it passed there as well (I’m always cautious when it comes to the URL changing)

#28

Rein

Great!! can you send me a copy of that build, so i can futher developing the site locally.

Thanks again for making this module and the quick support, outstanding!

#29

BoldMinded (Brian)

Build sent, and you’re welcome 😊

Login to reply