Currently, all URLs to taxonomy/term/% say "page not found."
Here's what i did the last minutes:
My taxonomy view consisted of very large entry;I just did the usual customized taxonomy/term/% view: I first duplicated the original one, and then I deactivated it.
In my custom module, in hook_nodeapi(), I checked if the current URL is /node/*, and in the case it's not (e.g. it's a taxonomy view), I skipped my custom additions (lookup content in a file). It worked fine, with small "teaser" entries on the tax.page.
I changed the page size in view, increased it, and exposed it. Then I recognized some minor things that were not well done, deleted the view, and recopied it again.
Now all URLs to taxonomy/term/% say returns the "page not found" error.
I can't figure out why. The cache is cleared, and I am logged in as administrator.
Preview in Views UI works fine.
Had active a second view with the path defined...
Related
Outline
I have a custom type (Dexterity) called "Gallery Profile", for this type I went into the ZMI (portal_skins/custom), created a new "Page Template" and wrote a custom template for my gallery. The gallery contains a bunch of lower down images and one main image of the owner of the gallery, like a News Item view but a gallery tacked on the bottom.
The customer wants this main image to be published to Facebook when someone hits 'Share' and some more specific info in the title when published.
Work carried out
Configured a Rapido script to write the 'og:image' meta data etc HTML that is required to get this to work (the default Plone stuff only publishes the sites logo unless you're viewing one Image type).
If I go to test the HTML coming out of Rapido via direct web address it works swimmingly. (site.com/##rapido/og_share/block/og_share) - I'm on the slightly older version of Rapido hence the non-plural version of block.
The problem
If you go to my gallery page where we have applied the template, then check the HTML, all of the OG meta data is pointing to the template instead of the current page its on.
This effects queries too (if for example you're using a script to find out what images are within a folder) - it searches /my_template instead of site.com/a_folder/my_template_is_on
In the Rapido Python file I've tried things like:
context.content.absolute_url()
context.content.absolute_url_path()
context.request['URL']
context.request['VIRTUAL_URL']
context.request['ACTUAL_URL']
... and probably more as I've been at this a while.
If you're not on the custom template, it works.
To Reproduce
Create a custom template
Assign it as the default view of a folder or any type.
In your template put <div tal:replace="structure python:context.REQUEST"></div> (just to see the difference)
In your Rapido try using context.app.log() and any of the above
Refresh your templated folder while checking the logs and the output from the context.REQUEST stuff.
You will see the differences and how Rapido is having a hard time getting the URL of the page you are on even though its there.
I've always had this problem with Rapido I just tend to work around it but in this particular situation I am stumped.
So in summary
Am I being an idiot and missing something obvious?
Is this possible?
Thank you for your time.
I've got a single page, where it checks a slug. If this slug can not be found in a database table, the single page should render the 404 page.
Something like this I have tried:
$this->render('/page_not_found');
Now, this goes to your active package single pages directory (packages/your_pkg_handle/single_pages/page_not_found.php). It should go to the active theme instead though... I have tried setting the second parameter to "null", as I thought that would be the pkgHandle, but no result. Obviously I'm missing something or this is not possible?
Try
$this->replace('/page_not_found');
instead.
This is a little convoluted, but the reasoning behind this is $this->render() actually renders the view with the current controller (which will mean looking into the package for the view), whereas $this->replace() will replace the rendering session entirely with a new controller, view and exit output.
I have some links in footer of a MasterPage. Home, About, Terms, Contact and so on. The Terms link has navigateUrl as : "~/en-us/Terms" and for Contact link: "~/en-us/Community/Contact".
In global.asax, my route table is as follow:
routes.MapPageRoute("", "en-us/Terms", "~/EN_US/Terms.aspx");
routes.MapPageRoute("", "en-us/Community/Contact", "~/EN_US/Community/Contact.aspx");
My problem is: I don't add Community/Contact.aspx in my solution yet, so when I click on Contact link, I expect to receive The resource cannot be found error, but it redirects to Terms page. Worse than that, every addresses that not exists, also do the same. For example, when I try "localhost:1384/en-us/someWords/anotherWords" (Exactly the same), it redirects to Terms page.
I delete cookies, delete browser history, delete ASPTemplate Files, shutdown VS, restart Windows, Clear solution, rebuild it and any thing else. and the problem remains
I use VS.2012, asp.net 4.
After Contact link was clicked, in browser address bar, I see localhost:1384/en-us/Community/Contact, but the content of page is exactly like Term page and I don't know why.
Because you are not giving the routes names, the first one becomes the default route. Thus defaulting to Terms.
We have a view setup to pickup the author/id
I see results, however, the pager is not working. We have a pager set, but at the bottom, it says "No query was run".
In addition, if I use the contextual filter and type author/110, it shows nothing on the preview, even though the regular page shows results.
How can I filter and get the pager working.
Update: I chose "Full Pager" and I can see it on the preview, but not the regular page after I save. What could the problem be?
Update 2: If I set pager id = 1 or higher, I can see it on the preview AND the regular page. However, it has odd url values with commas, is page 2 really Page 2?
The $pager variable within the templates (in views - theme information regarding active template name) might be missing or check for any views hook (there are min. 8 of them) that is changing the behavior of the views.
I'm working with Drupal 6 to create a feed collecting site. I import the original feeds via the feeds module and copy their tags. But I also want to assign a category (terms from second taxonomy) according to the author name to be able to divide the content in a unified way.
I want to use the rules module (rules-6.x-1.2) to assign these categories upon import. I use the following steps:
ON event Content is going to be saved
IF textual comparison ([node:author-name], TheAuthorName)
DO Modify node taxonomy terms (saved content, permanently, add the selected terms)
I select the terms to be added as "-none selected-" for tags and "TheCategory" for categories.
Now, when I import the feed, the category "TheCategory" is added to the content, but the tags vanish.
This happens also if I select "Replace existing terms with selected ones" or "Replace terms within same vocabulary" for the action. Upon editing, always the radio button of "add …" is selected, regardless of what I entered previously. And yes, I clicked on "save".
Is this the right way to do what I want? Why isn't it working? Could I do this with another module maybe (I don't need rules for anything else …)?
Thanks for your help!
Ok, so I found out that the right trigger to do this is "new content is created" (which I somehow couldn't get to work beforehand).
So, I ran the rules module in debug mode and found that the rule was triggered, the filter returned TRUE and the modify node taxonomy action was successfully accomplished. But the taxonomy was entirely unchanged.
I played around a little and postponed a "save content" action on the newly created content. Turns out, this fixed the problem and now everything works as I intended.
Still, there are some flaws:
I checked "permanently apply changes", but it did not do anything.
I unchecked "permanently apply changes", but upon editing again, the box was checked again (probably the setting was not saved to begin with)
The same holds true for the radio buttons for the type of "modify node taxonomy" action which was obviously not saved
Maybe this can help someone.