We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I did set up a site with path: "en/site"
>> Cms::Site.first.path Cms::Site Load (0.3ms) SELECT `cms_sites`.* FROM `cms_sites` LIMIT 1 => "en/site"
Now, when I look at the full_path of the first page of that site, I get "/" back
>> Cms::Site.first.pages.first.full_path Cms::Site Load (0.3ms) SELECT `cms_sites`.* FROM `cms_sites` LIMIT 1 Cms::Page Load (0.4ms) SELECT `cms_pages`.* FROM `cms_pages` WHERE `cms_pages`.`site_id` = 1 ORDER BY cms_pages.position LIMIT 1 => "/" >>
Also, when I make this page redirect to it's first child page, it redirects to
/first-child in stead of /en/site/first-child
>> Cms::Site.first.pages.first.children.first.full_path Cms::Site Load (0.3ms) SELECT `cms_sites`.* FROM `cms_sites` LIMIT 1 Cms::Page Load (0.4ms) SELECT `cms_pages`.* FROM `cms_pages` WHERE `cms_pages`.`site_id` = 1 ORDER BY cms_pages.position LIMIT 1 Cms::Page Load (0.3ms) SELECT `cms_pages`.* FROM `cms_pages` WHERE `cms_pages`.`parent_id` = 1 ORDER BY cms_pages.position LIMIT 1 => "/first-child" >>
Conclusion: could it be that the site path is not taken into account for building the page full_path (which makes the redirect not work properly)?
The text was updated successfully, but these errors were encountered:
Right it looks like the page model does not consider the Site path when generating a url
def assign_full_path self.full_path = self.parent ? "#{self.parent.full_path}/#{self.slug}".squeeze('/') : '/' end
# Full url for a page def url "http://#{self.site.hostname}#{self.full_path}" end
Sorry, something went wrong.
building the right url for pages taking care of site path comfy#173
5ff2507
Merge pull request #177 from Zorros/173_hotfix_page_path
89148e2
building the right url for pages taking care of site path #173
No branches or pull requests
Hi,
I did set up a site with path: "en/site"
Now, when I look at the full_path of the first page of that site, I get "/" back
Also, when I make this page redirect to it's first child page, it redirects to
/first-child
in stead of
/en/site/first-child
Conclusion: could it be that the site path is not taken into account for building the page full_path (which makes the redirect not work properly)?
The text was updated successfully, but these errors were encountered: